Cleanup separation between listen_for_keys and main
Reorganize stately code into separate modules
Cleanup OS plugin