Added all the API methods. UNTESTED of course :P

Also split stuff in one file per API sections.