* Refactor code into class structure