Made a few changed for compatibility with main project.