Added more detail to internal functions