Refactored BoxPosition so it works a little more cleanly.