adding pagination search

Fixes #3
cleanup
WIP: reorganizing code
cleanup of messages.rb
restructuring request
making stuff a bit better