Started writing main rest server