made superficial changes to klist and kstack so they can be in the same file, added file parsing to freezerfunction