AngularJS best practices: Refactoring existing code to use Angular | Hacker News Reader