restructured angular modules to pass build and function in browser