cleaned up minor code
fixed branched issues