added some files, tightened functionality
cleaned code