Fix some issues: #1 #2
Some added features : #3 #4