Moved program parts into modules