Removed jquery mobile and refactored code