Finalize producer code, refactoring, and added some documentation.

Signed-off-by: Jerome Doby <xaerodegreaz@gmail.com>