Major refactor to angular stuff