Converted angular controllers / services to TypeScript