Cleaned up some code, location relative to null still not working