cleans up error messages - fixed other small problems