Refactor module to new kfile interface. Spit test function in new file.