Brute-force merge of new API code for sprint 2 (doesn't compile, yet)
Fixed compilation errors. unit tests don't pass yet though.
Tests pass, but implementation is horrible.