Refactor location, filename, and klabel attributes

**please review**
Not so much with this. I think `filename` should always have a value. Something other than null and the empty string.