New class to create and manage components, reworked the main program