more bugfixing and some new features