started refactoring as Sinatra app