Clean up code; add location tags.