Restructured and moved stuff into scripts