Updated stat handling again, need to fix one bug for linking files and then add in the remaining hooks and it's ready.