Added simple fuzzy matching and refactoring existing code and also closes #4