Separated server-related code
Added payload format verification
Don't need to have local api right now
Started to work on cherrypy API