move rabbit.rb into lib folder