added constructors for each classes, added getXpos and getYpos in class Elements