(1) Added register on ready output signal. (2) removed trailing whitespace.