Resorted things

* Deleted outsource.php
* Moved everything into classes and namespaces