RFC position code

This is a stab at the position code. Any feedback welcome.

I need to at least clean it up and add more tests. Just want to make sure it's going down the right track.
should be qtys.head. trying to avoid division if it's not needed.