Slowly making simple server more testable