added new restler server with post api, cleaned up some code