Improved the checks of the input data to avoid error. Esthetics changes. Improved the documentation and usage