Organize init and fix signaling bug