Improved the http controller