autocompletion, bookmarks and code cleanup

Improved the autocompletion (entry is automaticly updated) and made the
program respect changes to the bookmarks file by other running
instances. Last but not least cleaned up the code.