Start using httpkit, code refactor