Fixed CodeWork issues #4, #5, #6, #7, #8, #9

fixes issue #4
fixes issue #5
fixes issue #6
fixes issue #7
fixes issue #8
fixes issue #9