Main: cleanup, coding style