Cleaning up.
Extracts all things sinatra to the core.
Adds spec for params handling.