Fixed many compat issues. Added scripter tests