Component system improved

Fixes #168