bootstrap angular
move templates and controllers
fix a JS infinite loop