Make classmethods where appropriate, misc style fixes