merged code with maria and dan

Code has been organized( as such ) and should be almost final