split main file to header and source