Improve setup program
Fix few things
Start refactoring