Refactored some code... Got UI element appearing