Formated code and removed unused code.