Moves search logic to model and adds travis-ci configuration