Break up editSelectedPost method, fix JSDoc, and typoed variable