devcode backup

refactoring / bugfixes