Added better functionality for keyboard showing/hiding. Made better
logic for moving x icon. Tied box dragging to x