refactored the classes for better reading
merge
merged for conflicts