Made some functions private