added secondary component logic, cleanup debug messages