Refactor location, filename, and klabel attributes

**please review**