validation and copyediting. some bug fixes