Refactored the code and added better link to GoDoc.