Added constructors and some modifications.