Fixed up separation of functions