restructuring to get rid of sinatra