Getting ready for Api/Basecode

Lots of stuff added/changed/deleted