performance and style updates

Signed-off-by: Kulamagal Mahendrarajah <kulamagal@qi-interactive.com>
Merge branch 'refs/heads/master' into gms.com

Signed-off-by: Kulamagal Mahendrarajah <kulamagal@qi-interactive.com>

Conflicts:
	js/main.js