Cleaning, consolidation, the usual.

Cleans code and Makefile up and updates for latest API