Clean up some more source and sink bugginess. Tests on Windows now work perfectly.