cleaning up george's contributions, touching remaining items from jonathan's review. overall, better code, more testing