[bugfix]files where not being cleaned up after execution
[minor] split main in half to seperate console from interactive