Updated some formatting stuff and removed unused variables
Merge branch 'master' into performance
Tidied things up