mass refactor needed, just angular working