Cleaned up the code, and fixed a layout issue with mobile phones