Optimization of Logic module. Added docs about colors.