Rewrite spell file loading

Separate file name string generation and load order logic