code clean up after bugfixes