Refactor sinatra app for better organization