Use references to pass / hold OSL related objects.

Fix tests previously disabled when OSL was enabled.

Fix indentation.