fix some minor style issues
reduce config register code by a reasonable amount