Added rotation and fixed positioning of joints