DRY 'shiftInAt0' functions and friends
Improve documentation
Update 'delay' to use updated 'shiftInAt0' function