Split up angular code