Fix typos and wrong declarations to resolve #50.