Better support for sinatra

@bmaland how about this? related to #2