More work on texture loading, app state.