Added callback functions for self-initialization on document ready