Changes for cowboy 0.9.0

Minor changes in cowboy API, i've changed the handler.