Not using hooks now; some simplifications