refactoring of texture loading to sane
different level structure