Refactor location, filename, and klabel attributes

**please review**
I agree with this.