BUGFIX: Minor bugfixes, work in progress.