* Added code block termination comments
* Moved all code into class structure