Fixed a possible memory leak when a resource was unable to be loaded
Fixed a misplaced & for a reference variable.
Added a distance function in preparation for collision management
Update makefile