Refactored init. Multiple callbacks were being called.