Refactored to be a cleaner angular app.