Fix ident and spaces
reorganize setup function