Code cleanup (rebracing, extending)
More code cleanup (rebracing, extending)