Fixed style issues after renaming, minor improvements in error message.