Resolved issues #3, #4, #5 and #6

Resolved issues #3, #4, #5 and #6