Fixed normalize function
Fixed order of constructor parameters.