optimize sort query for last seen view
Correct stacktrace tests
Trim source lines when fetching remote