complete rewrite

Rewrite to make it easier to read code and make the size logic more
robust, so it doesn't skew objects over multiple resizes because of
rounding of numbers.
removed unused code

unused code that was added during rewrite
updated readme

after rewrite the readme wasn't up to date.