I optimized the structure of the core module and commented almost every class of the module.

Signed-off-by: Patrick Meppé <tapmeppe@gmail.com>