Initial fixes since refactoring