update mongoid gem and reorganize the sinatra file