Took out unnecessary code and made it better