Some fixes and testing

Still need more work on core movementcode