Fixed random bugs preventing elbow kinks from working. Basic rotational functions should be extracted so that the tree rotaties right