Code refactoring

- Replaced the try/catch blocks if statements and sanity checks
- Moved the docs opening keyboard shortcuts from OSX to Default map