Some minor improvements + TDD.