code refratoring for perl, adding basic functionnality for front-end