Fixed constructor (added $this-> for member funcs)