Extracted some methods.