clean up and beginn of structuring and encapsulation