Cleanup time! And some bug fixes.