Clean up code in external tools package