Formalized comments and removed unnecessary functions and objects