style fixes, extract constants to methods