Creating API framework
Cleaning up some code