refactor coordinate class; end-of-stream handling in UctMain