prettify, simplify, and restructure