Beginning to divide functions for filetype