Many changes

Fix #2
Fix #3
Fix #4
Fix #5