angular service with helpful methods for objects