Fixed code overflow on smaller screens, cleaned up php code.