Made changes to allow the program to be exported and ran as a jar