formatting and deadcode cleanup