Some changes for supporting tornado server