added main JS modules and reworked angular front-end to work off of them instead of scoped variables in controllers