Several refactors. Added HTTP ping adaption layer.