Started work on openChats.c, started to write out apply fn.