Modify folder structure, add init fn, change legality test fn names