Massively restructured angular code