cleaned up cache and $api. there were bugs.
Merge remote-tracking branch 'origin/master'