fixup vector math
added debug script
deleted obsolete files