cleaning up and adding a main file