Properly use the lazy attribute on Swift variables.
Fix a bug.
More minor changes.