fix request URI
moving methods to a new helper
cleaning controller