Adding Reference tests and cleaning up malformed code/refactoring badly named files
Merge remote-tracking branch 'origin/master'