WIP Remove API

Includes changes from PR #1086
Karma tests fail on my laptop
This is what I did:

git fetch upstream
git checkout master
git merge upstream/master

Is this equivalent to rebase?  If not, what are the git commands for rebase?