cleaned up tests and fixed gateway case (previously not covered)