Removed some extra debug output etc.