fixed broken sinatra version and some speedups