Code formatting, getPart function added