Fixed USB broken pipe errors + some code cleanup.