added timeouts and removed inconsistent '\r's. resolves #3.