Various changes...
backup of version with joint 5 disabled