bugfix

Fixing a lot of errors following refactoring