Comment typos, duplicate code removal and avoid unnecessary fetch of column key_ from the database.

Commit 862affa: comment typos fixes.

Commit d4c46d8: remove duplicate code.

Commit 39dc6cd: key_ column is being fetch from the database while it is set in the WHERE condition (using the value stored in the variable key). Therefore the value stored in the variable key can be used, avoiding the unnecessary fetch of column key_ from the database.