restructure scripts