Moved private methods to common place