bug fixes, email tweaks, closed #21