added description and tests to program constructor, made http primitives more robust