Update api.php

Moved functions to a new trait called funky so all functions can just "use Funky" lol and have a few additional functions within the class. Its a nicer way for inheritance.