Init function with callback and options