complete splitting the program into single source files
code cleanup