Cleaning up the code and improving mobile