Minor restructuring
Updated with mobile touch events