Did some refactoring. Fixed some bad coding practices.