Cleaned up bottom code.

Fixes #8