ENH: Adding more tests and some clean-ups.