Refactored http package into smaller files.