Refactor this method a bit, and correct a test that was completely wrong but happened...