started implementing changes from MyApplication into main app.
Fixed .txt being added to filename in wrong place