Cleaned up some code, added file location arg