Compile fixes for refactor