added contract checks for hwm and connections
Merge pull request #13 from reinferio/more_contract

added contract checks for hwm and connections