Change relase version number to 0.5.0
Fix typos and errors
Translate nearest neighbor part