Added scheduling (rufus) and moved timeout check

Timeout check is now every 5m with rufus scheduler... will be decreased
shorly.

Also made some globals now.