Grid initialization fix. Demo main() cleanup.