split program into interface, implementation, and main files