Cleaned up sed syntax to make it easier to read