cleaned up scripts in data folder and unified code