Changes to make it easier to include in other systems