Added some header documentation.

Signed-off-by: Esteban Torres <me@estebantorr.es>
Better organized code and using constants.

Signed-off-by: Esteban Torres <me@estebantorr.es>
Defined constants header for easier access.

Signed-off-by: Esteban Torres <me@estebantorr.es>