Merge "Rearranging the code structure to allow replacing state logic." into ub-launcher3-master