Refactored code. Added some new filename destinations too.