Create framework.php

I have some doubts that I can do stuff using $this->api->etc stuff when it's not implemented as a Plugin, but I can't test it right now.