Cleanup
More rigorous testing, cleanup, fixes