Added more angular stuff, some refactoring too.