Refactor Union Station support code.

Split it into multiple files and rename classes.