Addd main scheduler and key listener