Added constructors, while control structure.