refactoring to support removeById, fixing unit tests, switching from console to $log for cleaner test output