Polishing and bugfixing