Reworcked some classes and structure