Add callback (on create) and clean code