cleaning up top level and building top level script