#96 Replace old style of injecting angular script with Template Registration

Also did a little bit of code cleanup