Updated the compiler's output formatting.

1. Actual scene code is now wrapped in a function.