remove dependency on backend
move classes to codedb and backend plugins
update tests and fix errors