Classical inheritance in two JavaScript functions, without sacrificing personal preference