[GETCURRENTMAINMENU method ]Some bugs are corrected, code cleaned and commented. The output now correspond to our JSON RPC API standard.