Repo refactor and webproject hooks fixes