Reimplementing everything yet again this time in angular