Varous bugfixes + new features