fixed and refactored a variety of issues [KFSQA-1066]
Merge remote-tracking branch 'origin/master'