Added blink() and out(). Ready to add thread specific code