PR#109 and some correction

I proceeded to implement #PR109 and make some other correction.