initial refac commit
created lib folder
clean up
Cleanup, adapted sim1,sim2
refac
more cleanup