Migrated download functionality, now working also with ol3