core: store line info, add fields and methods to api, refactoring
gui: add fields and methods to tree