Updated the space calculations. Got a pretty good, working version now.