Refactor redondant parts of the code and modify some default values to be more convenient for the user.