iPhone view is now working correctly. The iPad view needs to be fixed though