Fixed #115
Fixed #117
Fixed #118
Fixed #119
Minor changes