Refactored bobbing, made some changes to it