refactoring
more awesome refactoring
moved output to seperate file
refactored the hole project