Update after feedback:
* Array deallocation handled properly
* Removed commented out code
* Creation of filename list done using MCListRef now