Small fixes for BIG refactoring