Fixed error code when file already exists
Added new hooks: rename, rmdir, unlink
Whole retructuration to accomodate easy file renames