fp bug fixed, windows lstat fix

will no longer run out of file pointers (most of the time), if windows, will use stat rather than lstat since... yeah windows
comments

began doing full code comments, preparing for submission