Functional newproject command and cleanup