More tests and beautification.