Changed some code that is not intented to be part of the public API to internal