update-hook and public directory refactor