Bugfix, improved context menu

-Thread.sleep is found to be blocking the process. It is now removed.
-Context menu functionality improved