misc changes - support income/credit transactions; fix some queries