Method flatten added with its tests. Deleted backup folder