Added onFirstInit and onInit callbacks