Made some methods protected so it is more easily extendable