Converting more to prototype functions