Tests, bug fixes, beginning References