Created a library for various functions

Also cleaned up various temp folders