offloaded program_init to its own module

allows globals for Queue/DB_cursor