Gradually moving on with API and comments, bringing in a re-written core as I go