Settings and cleanup

Added pane/keyboard settings, some comments, and cleaned up various areas.