Extracted several methods from init()