Change angular js files to make more testing friendly