more clean up. Moved methods into lib and input files into input