making more object oriented
changes to main
merged