tabs -> spaces
Added delay to loop waiting for key.