Cleaning

Factoring and cleaning up code before trying to organize components
into Map structure.