Removed an unneeded temp variable and simplify the constructor