Fix shortcuts (patch by Christoph) + minor cleanup

Authored by yurchor on Aug 24 2017, 9:28 AM.