Bugfix
Fixed typos and removed unused code