Reorganizing and fixing names.
Convert more unittests from doctest to nose.