Refactoring a bit more. Basically shooting in the dark.