Implement basic gtserver functionality.

For #178, #179