Fixed issue #25

Also fixed some naming incoherencies and a few typos.