changed alot

updated code to facilitate parsing of files
and changed files arround