Don't move onto the next user story before you know that the user story you've been working on is done. How do you know when a user story is done? I use the following check list:
The code compiles.
All the automated unit tests are passing and test coverage is between 85% and 100%. (Be guided by the need to provide tests for everything that could possibly break)
The code has a simple design that uses the fewest classes and methods.
The code is well factored and without duplication.
The code is clean and structured to coding standards.
The code is self-documenting and clearly communicates my intentions a the developer.
The code is checked-in, integrated (and builds successfully).
All the acceptance tests (automated with FIT) are passing.
The customer has verified that the acceptance criteria have been satisfied. I don't wait for the end-of-iteration review. I like to get this approval as soon as possible after I've checked-off the items above.
You can take out some technical debt on 3 and 4 if the situation absolutely requires it, but you should ensure that it's repaid quickly. Don't let your technical debt build up. The interest repayments can be a killer.