mostly changed all APIs, lots of cleanup to do