Refactor angular and require modules