basic certificate verification working
cleanup and 1.8 friendliness