Small bugfixes. Some methods and variables renamed.