Unused code is removed; code is moved between files for better focus.