Add Rack::Csrf for enhanced security
Restructure code