Added registration event hooks and removed unnecessary files.