cleanup & de-inline