Complete rewrite with sinatra.
Complete rewrite with sinatra.