Refactor the code and start using an IDE