General changes, bugfixes.