Refactor HasTableGotLocationData
Refactor GetLastVisited a little bit
Fixed compile bug