Removed obsolete variables. Issue #77
Make sure that menu won't go off viewport edge. Issue #77