Refactored thrift server creation