Added more code reuse.