Move parsing routines to ServerHandler