Fixed some stuff in Main, and added path function in util