changes gitk command to use gitg instead
add missing imports
some code refactor