Fixed issue : #77,#78
Merge pull request #88 from xandros6/refactor

Fixed issue : #77,#78