New version after first refacto. (Initial commit from now ;) )