cleaning some of the code and converting to using B::OP::HTTPS