Clean main, better control of logs, added timer, moved assignment steps
to method