removed unnecessary lines
refactored constructors