Code refactoring (description below)

Removed redundant outputs, useless comments, RAPID methods, added using
namespaces