Moved HTTP handling to separate package