refactored search from horrible to decent
Merge pull request #54 from Mession/search_refactoring

Refactored search from horrible to decent
Refactored references_helper
Fixed indentation
Update .travis.yml
Pull

Conflicts:
	.travis.yml