From cfe4fb1ca8cd03cd609e17df5ddf9b138448db5b Mon Sep 17 00:00:00 2001
From: lolandese <lolandese@210402.no-reply.drupal.org>
Date: Thu, 28 May 2015 23:31:30 +0200
Subject:  lolandese: Generated with Drush iq

---
 INSTALL.md                                         |    7 +
 INSTALL.txt                                        |    7 -
 LICENSE.txt                                        |  340 ++++++++++++++
 README.md                                          |  315 +++++++++++++
 README.txt                                         |  332 --------------
 block/INSTALL.md                                   |   21 +
 block/INSTALL.txt                                  |   21 -
 block/README.md                                    |  267 +++++++++++
 block/README.txt                                   |  267 -----------
 block/config/flickr_block.settings.json            |    8 +
 block/flickr_block.admin.inc                       |   10 +-
 block/flickr_block.info                            |    5 +-
 block/flickr_block.install                         |  485 ++++----------------
 block/flickr_block.module                          |  296 ++++++------
 cachewarmer/INSTALL.md                             |    2 +
 cachewarmer/INSTALL.txt                            |    2 -
 cachewarmer/README.md                              |   23 +
 cachewarmer/README.txt                             |   23 -
 cachewarmer/config/flickrcachewarmer.settings.json |    6 +
 cachewarmer/flickrcachewarmer.admin.inc            |   14 +-
 cachewarmer/flickrcachewarmer.info                 |    3 +-
 cachewarmer/flickrcachewarmer.install              |   18 +-
 cachewarmer/flickrcachewarmer.module               |   28 +-
 config/flickr.settings.json                        |   37 ++
 css/flickr.css                                     |  106 +++++
 css/flickr_cc_icons.css                            |   69 +++
 css/flickr_cc_icons_on_hover.css                   |   12 +
 field/README.md                                    |   77 ++++
 field/README.txt                                   |   77 ----
 field/flickrfield.info                             |    3 +-
 field/flickrfield.module                           |    6 +-
 filter/README.md                                   |  213 +++++++++
 filter/README.txt                                  |  213 ---------
 filter/config/flickr_filter.settings.json          |    6 +
 filter/flickr_filter.admin.inc                     |    8 +-
 filter/flickr_filter.info                          |    3 +-
 filter/flickr_filter.install                       |   20 +-
 filter/flickr_filter.module                        |   74 +--
 flickr.admin.inc                                   |  168 ++++---
 flickr.api.inc                                     |   18 +-
 flickr.css                                         |  106 -----
 flickr.inc                                         |   80 ++--
 flickr.info                                        |    3 +-
 flickr.install                                     |  159 +++----
 flickr.module                                      |   59 ++-
 flickr_cc_icons.css                                |   69 ---
 flickr_cc_icons_on_hover.css                       |   12 -
 flickr_colorbox.js                                 |   15 -
 js/flickr_colorbox.js                              |   15 +
 sets/README.md                                     |   62 +++
 sets/README.txt                                    |   62 ---
 sets/config/flickr_sets.settings.json              |    6 +
 sets/flickr_sets.admin.inc                         |    8 +-
 sets/flickr_sets.info                              |    3 +-
 sets/flickr_sets.install                           |   20 +-
 sets/flickr_sets.module                            |   32 +-
 style/README.md                                    |   63 +++
 style/README.txt                                   |   63 ---
 style/config/flickrstyle.settings.json             |   11 +
 style/flickrstyle.admin.inc                        |   26 +-
 style/flickrstyle.info                             |    3 +-
 style/flickrstyle.install                          |   27 +-
 style/flickrstyle.module                           |   58 ++-
 tags/README.md                                     |    3 +
 tags/config/flickr_tags.settings.json              |    4 +
 tags/css/flickr_tags.css                           |   22 +
 tags/flickr_tags.admin.inc                         |   39 ++
 tags/flickr_tags.css                               |   22 -
 tags/flickr_tags.info                              |    3 +-
 tags/flickr_tags.install                           |   18 +
 tags/flickr_tags.module                            |   24 +-
 71 files changed, 2458 insertions(+), 2249 deletions(-)
 create mode 100644 INSTALL.md
 delete mode 100644 INSTALL.txt
 create mode 100644 LICENSE.txt
 create mode 100644 README.md
 delete mode 100644 README.txt
 create mode 100644 block/INSTALL.md
 delete mode 100644 block/INSTALL.txt
 create mode 100644 block/README.md
 delete mode 100644 block/README.txt
 create mode 100644 block/config/flickr_block.settings.json
 create mode 100644 cachewarmer/INSTALL.md
 delete mode 100644 cachewarmer/INSTALL.txt
 create mode 100644 cachewarmer/README.md
 delete mode 100644 cachewarmer/README.txt
 create mode 100644 cachewarmer/config/flickrcachewarmer.settings.json
 create mode 100644 config/flickr.settings.json
 create mode 100644 css/flickr.css
 create mode 100644 css/flickr_cc_icons.css
 create mode 100644 css/flickr_cc_icons_on_hover.css
 create mode 100644 field/README.md
 delete mode 100644 field/README.txt
 create mode 100644 filter/README.md
 delete mode 100644 filter/README.txt
 create mode 100644 filter/config/flickr_filter.settings.json
 delete mode 100644 flickr.css
 delete mode 100644 flickr_cc_icons.css
 delete mode 100644 flickr_cc_icons_on_hover.css
 delete mode 100644 flickr_colorbox.js
 create mode 100644 js/flickr_colorbox.js
 create mode 100644 sets/README.md
 delete mode 100644 sets/README.txt
 create mode 100644 sets/config/flickr_sets.settings.json
 create mode 100644 style/README.md
 delete mode 100644 style/README.txt
 create mode 100644 style/config/flickrstyle.settings.json
 create mode 100644 tags/README.md
 create mode 100644 tags/config/flickr_tags.settings.json
 create mode 100644 tags/css/flickr_tags.css
 create mode 100644 tags/flickr_tags.admin.inc
 delete mode 100644 tags/flickr_tags.css
 create mode 100644 tags/flickr_tags.install

diff --git a/INSTALL.md b/INSTALL.md
new file mode 100644
index 0000000..c6ce88d
--- /dev/null
+++ b/INSTALL.md
@@ -0,0 +1,7 @@
+It is recommended to enable the Colorbox module prior to installation of the
+Flickr module. This avoids some manual configuration.
+
+1.) Extract the download package in the '/sites/all/modules directory'.
+2.) Enable the module in 'admin/modules'.
+3.) Configure the API Key and settings at '/admin/config/media/flickr'.
+4.) Allow permissions '/admin/people/permissions'.
diff --git a/INSTALL.txt b/INSTALL.txt
deleted file mode 100644
index c6ce88d..0000000
--- a/INSTALL.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-It is recommended to enable the Colorbox module prior to installation of the
-Flickr module. This avoids some manual configuration.
-
-1.) Extract the download package in the '/sites/all/modules directory'.
-2.) Enable the module in 'admin/modules'.
-3.) Configure the API Key and settings at '/admin/config/media/flickr'.
-4.) Allow permissions '/admin/people/permissions'.
diff --git a/LICENSE.txt b/LICENSE.txt
new file mode 100644
index 0000000..1f963da
--- /dev/null
+++ b/LICENSE.txt
@@ -0,0 +1,340 @@
+                    GNU GENERAL PUBLIC LICENSE
+                       Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                            Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+                    GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+                            NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+                     END OF TERMS AND CONDITIONS
+
+            How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License along
+    with this program; if not, write to the Free Software Foundation, Inc.,
+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) year name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  <signature of Ty Coon>, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.
+
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..535cf96
--- /dev/null
+++ b/README.md
@@ -0,0 +1,315 @@
+FLICKR
+======
+The Flickr module embeds images hosted on Flickr with a link to the
+corresponding Flickr page.
+- Flickr images can be displayed in blocks, within content or as fields.
+- Open Flickr photos in Colorbox, Lightbox or alike.
+- Show user/group photostreams and sets as responsive slideshows.
+- Image caption with the Flickr title, date taken, where and by who.
+- Show the longer Flickr description on hover if it exists.
+
+The content of this file is based on the online documentation that can be found
+at https://www.drupal.org/documentation/modules/flickr It is recommended to read
+it there, as it is more detailed.
+
+REQUIREMENTS
+------------
+This module requires Backdrop 1.X and a Flickr API key.
+
+LICENSE
+-------
+This project is GPL v2 software. See the LICENSE.txt file in this directory for
+complete text.
+
+MAINTAINER
+----------
+- Martin Postma (https://github.com/lolandese)
+
+INSTALLATION AND CONFIGURATION
+------------------------------
+It is recommended to enable the Colorbox module prior to installation of the
+Flickr module. This avoids some manual configuration.
+
+Install this module using the official Backdrop CMS instructions at
+https://backdropcms.org/guide/modules
+
+Configure the API Key and settings at '/admin/config/media/flickr'.
+
+Allow permissions '/admin/people/permissions'.
+
+SIZES
+-----
+The image size can be one of the following:
+
+Suffix - Label - Size in pixel:
+
+- s - Square - small square 75x75
+- t - Thumbnail - 100 on longest side
+- q - Large Square - big square 150x150
+- m - Small - 240 on longest side
+- n - Small 320 - 320 on longest side
+- - Medium - 500 on longest side
+- z - Medium 640 - 640 on longest side
+- c - Medium 800 - 800 on longest side
+- b - Large - 1024 on longest side
+- h - Large 1600 - 1600 on longest side
+- k - Large 2048 - 2048 on longest side
+- o - Original - original image, either a jpg, gif or png, depending on source
+    format
+- x - Slideshow - Responsive slideshow (for group, set and user IDs only)
+- y - Basic slideshow - Basic responsive slideshow (for set and user IDs only)
+
+NOTES:
+For square images ('s': 75px and 'q': 150px) no real width needs to be fetched, giving it a performance advantage over other sizes. Recommended if you include many images.
+
+TAKE CARE, the c (800px) size is missing on Flickr images uploaded before March 1, 2012. Check if it exists on the Flickr photo page > Actions > View all sizes.
+
+Embedded Flickr images have a maximum width of the region they are in. This means they adapt to it if they are bigger (responsive). You can use this on purpose to "fill up" e.g. the side bar.
+
+VIDEO SUPPORT
+-------------
+A video in an album of thumbnails shows as a still image, but can be played when
+opened in Colorbox with the option to show in fullscreen mode. Make sure that
+'Enable Colorbox inline' is selected at admin/config/media/colorbox.
+
+Alternatively, to 'play' the videos embedded on a site:
+- Put the videos (one or more) you want to display together in a set.
+- Show the set in the node body, a block or a Flickr field using the size x for
+  a slideshow or y for the basic version.
+
+SETTINGS
+--------
+Settings are found at '/admin/config/media/flickr'. After changing many of the
+settings below, it is often required to CLEAR THE SITE CACHE to have the changes
+to take effect on existing content at '/admin/config/development/performance'.
+
+### FLICKR CREDENTIALS ###
+
+### API Key ###
+
+Get an API Key at https://www.flickr.com/services/apps/create/apply
+
+### API Shared Secret ###
+
+### Default Flickr User ID ###
+To use if in the block configuration no user is specified. Must be a valid
+Flickr User ID, alias, username or email address. Emails or usernames (that
+might change at any given time) are internally (in the variable) replaced with a
+stable NSID (Flickr ID number). These are rendered in admin forms (settings or
+block config) as Flickr usernames. 'Maria Emanuela' is human readable,
+'43937662@N05' is not. Internal the module still uses the Flickr ID number as it
+is more reliable.
+
+### GLOBAL OPTIONS ###
+
+### Number of photos per album ###
+How many photos of a photoset display in your nodes if no number is specified.
+Defaults to 6.
+
+### Default size for photos in an album ###
+A default Flickr size to use. This will be used when no size is specified, for
+example [flickr- photoset:id-72157634563269642]. TAKE CARE, the c (800px) size
+is missing on Flickr images uploaded before March 1, 2012. Defaults to s: 75 px square. Thanks to
+the default setting you can change the size of all images without a specified
+size on the site in one go.
+
+### Minimum width to display a title caption ###
+Small images have little space for a title caption. Replaces it with the text
+"Flickr" that links to the photo page on Flickr to comply with their Guidelines.
+After saving the configuration clear the site cache. Defaults to 100 px. Set it
+to 0 px to always include a title caption or 999 px to always exclude.
+
+The presence of a caption is solely reliant on the values of this configuration
+fields and the one below.
+
+The text 'Flickr' gets added as a caption that links to the correspondent Flickr
+photo page if:
+- clicking the image links to a bigger version of it, using lightbox/colorbox or
+  not
+AND
+- the title caption that links to the Flickr photo page is suppressed
+  (depending on the size). Setting a 'class' or 'rel' value in the 'overlay
+  browser settings' (colorbox/lightbox), even one that is not valid, always
+  links the image to a bigger version of it.
+
+### Minimum image width to display date, location, photographer and optionally
+license info under the caption ###
+Suppress extra info on small images. After saving the configuration clear the
+cache. Defaults to 150 px. Set it to 0 px to always include or 999 px to always
+exclude. Adds date, location and photographer info to the caption on images of a
+certain width. The date is in the form of 'time ago'. The photographer's Real
+Name is used, if not available the Username. In the caption it links to the user
+page on Flickr. The license info is optional (see below).
+
+### License icon ###
+Radio buttons
+- No
+- On the image on mouse-over only (small in the top left corner, on hover).
+  NOTE: Does not display with the Flickr Style 'Enlarge'.
+- On the image (small in the top left corner, always)
+- In the caption
+
+To give proper attribution. Used is the nonintrusive CC icon font in
+'flickr_cc_icons.css'. It links to the corresponding Creative Commons human
+friendly info page. Download it if you prefer to host it yourself locally (CC
+4.0 licensed, give credit somewhere). Extract it in your theme folder and
+substitute the default used remote source that can be found in the module's
+'flickr_cc_icons.css' file. Just replace '//cdn.jsdelivr.net/cc-icons/1.2.0/'
+with '[path to your theme folder]/cc-icons- cc-icons-772e090/'.
+
+### License restriction for 'public' queries ###
+Radio buttons
+- Always restrict 'public' queries to only Creative Commons licensed media.
+- Do not restrict media to Creative Commons licensed on 'public' queries if no
+  results are returned.
+- Do not restrict media to Creative Commons licensed on 'public' queries.
+
+With 'public' queries are intended Flickr requests that do not specify a Flickr
+user or group ID, thus returning results from all public Flickr photos.
+
+### Extend the tag filter to search for matching terms also in the Flickr photo
+title and description besides Flickr tags. ###
+Descriptions are only searched on the album type 'user' (also 'public').
+Checkbox.
+Shows more results. Can be overridden individually by the filter tag,
+eg. [flickr-user:id-public, size-q, tags-Augusto Canario, extend-true] or in the
+specific configuration of a Flickr block.
+
+### Extra links to Flickr maps ###
+Checkbox.
+Include extra links to maps available for a user, group or set on
+Flickr. Locations mentioned (if displayed) under individual images link to
+corresponding Flickr user maps in any case, independent on the setting here.
+
+### Show a Flickr counter ###
+Checkbox.
+Shows how many photos are displayed out of the total number available
+for a user, group, set or tags on Flickr. Can be overridden by the filter tag,
+eg. [flickr-photoset:id-72157634563269642, count-false]
+
+### Use Google instead of Flickr for location info (reverse geocoding) ###
+Checkboxes:
+- In the album title
+- In the photo caption
+
+### DATE FORMATS ###
+Select fields of all defined date formats (long, medium, short) plus 'Time ago'
+custom defined by the Flickr module for the following elements:
+- When hovering an image (mouse-over)
+- In the image caption
+- When hovering a date in the caption. If you don't want to display anything
+  when hovering the date, select 'None'.
+- In the album title. If the selected date format contains a time, only the date
+  part of it will be used in the album title.
+
+### OVERLAY BROWSER (COLORBOX, LIGHTBOX) ###
+
+Colorbox, Lightbox or alike. Extending Colorbox/Lightbox support to User
+Profiles is still an open issue. Leave these fields empty to link directly to
+the Flickr photo page instead of opening the bigger version of the image.
+
+To have captions, you must fill in the 'class' or 'rel' field. Even if you do
+not intend to use an overlay browser, this is the condition to display a
+caption. This way any sites upgrading the Flickr module do not experience a
+change from the 'old' behaviour, suddenly having unexpected captions. If you
+want captions but don't want to use an overlay browser, just enter for example
+the name of your dog in one of the fields.
+
+### class ###
+Use 'colorbox' if you are using Colorbox. With Lightbox you can leave it empty.
+
+### rel ###
+Use 'gallery-all' if you are using Colorbox. It can be anything you want,
+really. As long there is something. Use 'lightbox[gallery]' if you are using
+Lightbox2. The part inside the square brackets can be anything you want but must
+be one word without spaces.
+
+NOTE: With Lightbox if you select an 'Automatic image handling' for Flickr
+images, you override the behaviour set here. If you don't want that, leave it
+'Disabled'. Find it at admin/config/user-interface/lightbox2/automatic
+
+### Image size to open ###
+The image size to open in the overlay browser when clicking the image. Larger
+sizes make navigating to next and previous pictures slower. TAKE CARE, the c
+(800px) size is missing on Flickr images uploaded before March 1, 2012.
+Defaults to -: 500 px on longest side.
+
+### Info to include when enlarging the image in Colorbox, Lightbox or alike ###
+Usually this info is displayed under the enlarged image.
+Checkboxes (multiple options can be selected).
+- Title
+- Date, location and photographer
+- Description, applies also on the text that shows on mouseover (the image
+  'title' attribute)
+- License info
+
+All selected by default except for 'License info'. This info is concatenated
+with '-' separators and added as the link 'title' attribute. HTML is
+stripped, double quotes are removed (it goes into the title-"[description]"
+attribute) and special characters are decoded (&copy; turns into ©). If the
+title and description are identical, only the title is used.
+
+As a side note: The description is always included as the image 'title'
+attribute (shows on hover). If the description is not available the title will
+be used.
+
+### STYLING (CSS RELATED) ###
+
+### Use flickr.css ###
+Checkbox. Uncheck to take care of the styling yourself in custom CSS. Selected
+by default.
+
+More styling options are available if the submodule Flickr Style is enabled.
+
+### ADVANCED ###
+
+### Update interval ###
+The refresh interval how often to check if cached Flickr API calls are up to
+date. Defaults to 1 hour.
+
+### Limit API requests for random and popularity sort ###
+Setting a lower number enhances performance but makes random results being less
+spread between one another (not less random) and returns popular (most viewed on
+Flickr) only for the n most recent. Minimum 20, maximum 500. If you use cache
+warming you can set the maximum (see https://drupal.org/node/1576686).
+
+### Use 'cURL' to determine the image width instead of 'fopen' used by the PHP
+function 'getimagesize' ###
+Checkbox (default OFF). Your server configuration now uses 'fopen' for external
+resources (used by 'getimagesize'). 'cURL' might be faster.
+
+### Use 'cURL' instead of 'stream_socket_client' (drupal_http_request) to makedata requests ###
+Checkbox (default OFF). Otherwise cURL will only be used as fallback when
+drupal_http_request fails.
+
+### Enable Debug Output ###
+Radio buttons:
+- None
+- Flickr response only (as a link to an XML page in a debug message)
+- Plus Devel (Flickr response plus additional output)
+Display the Flickr XML response, all passed photo/album arguments and HTTP
+requests/response objects via the Devel module.
+
+### CACHE WARMER ###
+Only if the submodule Flickr Cache Warmer is enabled.
+
+### BLOCK SETTINGS ###
+
+### Smart install of Flickr Block ###
+Checkbox (default ON). Disabled after install of Flickr Block. On install of
+Flickr Block auto create Flickr taxonomy, date and geo fields on all node types
+to grab Flickr photos related to the node on the same page as a Flickr block
+based on tags, a date or a location. Enable Taxonomy (core), Date (including
+date_popup) and Geofield before enabling Flickr Block for the first time (or
+uninstall it first).
+
+Other options appear only after the submodule Flickr Block is enabled. See
+https://drupal.org/node/2171249#config.
+
+### FILTER SETTINGS ###
+Only if the submodule Flickr Filter is enabled. See
+https://drupal.org/node/2171503#config.
+
+
+Other Flickr module specific info for developers can be found at
+https://www.drupal.org/node/2289797
diff --git a/README.txt b/README.txt
deleted file mode 100644
index 64416c6..0000000
--- a/README.txt
+++ /dev/null
@@ -1,332 +0,0 @@
-The content of this file is based on the online documentation that can be found
-at https://www.drupal.org/documentation/modules/flickr It is recommended to read
-it there, as it is more detailed.
-
-NAME
-====
-Flickr
-Project page at https://drupal.org/project/flickr
-
-REQUIREMENTS
-============
-This module requires Drupal 7.X and a Flickr API key.
-
-OVERVIEW
-========
-The Flickr module embeds images hosted on Flickr with a link to the
-corresponding Flickr page.
-- Flickr images can be displayed in blocks, within content or as fields.
-- Open Flickr photos in Colorbox, Lightbox or alike.
-- Show user/group photostreams and sets as responsive slideshows.
-- Image caption with the Flickr title, date taken, where and by who.
-- Show the longer Flickr description on hover if it exists.
-
-INSTALLATION AND CONFIGURATION
-==============================
-It is recommended to enable the Colorbox module prior to installation of the
-Flickr module. This avoids some manual configuration.
-1.) Extract the download package in the '/sites/all/modules directory'.
-2.) Enable the module in 'admin/modules'.
-3.) Configure the API Key and settings at '/admin/config/media/flickr'.
-4.) Allow permissions '/admin/people/permissions'.
-
-SIZES
-=====
-The image size can be one of the following:
-
-Suffix - Label - Size in pixel:
-s - Square - small square 75x75
-t - Thumbnail - 100 on longest side
-q - Large Square - big square 150x150
-m - Small - 240 on longest side
-n - Small 320 - 320 on longest side
-- - Medium - 500 on longest side
-z - Medium 640 - 640 on longest side
-c - Medium 800 - 800 on longest side
-b - Large - 1024 on longest side
-h - Large 1600 - 1600 on longest side
-k - Large 2048 - 2048 on longest side
-o - Original - original image, either a jpg, gif or png, depending on source
-    format
-x - Slideshow - Responsive slideshow (for group, set and user IDs only)
-y - Basic slideshow - Basic responsive slideshow (for set and user IDs only)
-
-NOTES:
-For square images ('s': 75px and 'q': 150px) no real width needs to be fetched, giving it a performance advantage over other sizes. Recommended if you include many images.
-
-TAKE CARE, the c (800px) size is missing on Flickr images uploaded before March 1, 2012. Check if it exists on the Flickr photo page > Actions > View all sizes.
-
-Embedded Flickr images have a maximum width of the region they are in. This means they adapt to it if they are bigger (responsive). You can use this on purpose to "fill up" e.g. the side bar.
-
-VIDEO SUPPORT
-=============
-A video in an album of thumbnails shows as a still image, but can be played when
-opened in Colorbox with the option to show in fullscreen mode. Make sure that
-'Enable Colorbox inline' is selected at admin/config/media/colorbox.
-
-Alternatively, to 'play' the videos embedded on a site:
-- Put the videos (one or more) you want to display together in a set.
-- Show the set in the node body, a block or a Flickr field using the size x for
-  a slideshow or y for the basic version.
-
-SETTINGS
-========
-Settings are found at '/admin/config/media/flickr'. After changing many of the
-settings below, it is often required to CLEAR THE SITE CACHE to have the changes
-to take effect on existing content at '/admin/config/development/performance'.
-
-FLICKR CREDENTIALS
-
-API Key
--------
-Get an API Key at https://www.flickr.com/services/apps/create/apply
-
-API Shared Secret
------------------
-
-Default Flickr User ID
-----------------------
-To use if in the block configuration no user is specified. Must be a valid
-Flickr User ID, alias, username or email address. Emails or usernames (that
-might change at any given time) are internally (in the variable) replaced with a
-stable NSID (Flickr ID number). These are rendered in admin forms (settings or
-block config) as Flickr usernames. 'Maria Emanuela' is human readable,
-'43937662@N05' is not. Internal the module still uses the Flickr ID number as it
-is more reliable.
-
-GLOBAL OPTIONS
-
-Number of photos per album
---------------------------
-How many photos of a photoset display in your nodes if no number is specified.
-Defaults to 6.
-
-Default size for photos in an album
------------------------------------
-A default Flickr size to use. This will be used when no size is specified, for
-example [flickr- photoset:id=72157634563269642]. TAKE CARE, the c (800px) size
-is missing on Flickr images uploaded before March 1, 2012. Defaults to s: 75 px square. Thanks to
-the default setting you can change the size of all images without a specified
-size on the site in one go.
-
-Minimum width to display a title caption
-----------------------------------------
-Small images have little space for a title caption. Replaces it with the text
-"Flickr" that links to the photo page on Flickr to comply with their Guidelines.
-After saving the configuration clear the site cache. Defaults to 100 px. Set it
-to 0 px to always include a title caption or 999 px to always exclude.
-
-The presence of a caption is solely reliant on the values of this configuration
-fields and the one below.
-
-The text 'Flickr' gets added as a caption that links to the correspondent Flickr
-photo page if:
-- clicking the image links to a bigger version of it, using lightbox/colorbox or
-  not
-AND
-- the title caption that links to the Flickr photo page is suppressed
-  (depending on the size). Setting a 'class' or 'rel' value in the 'overlay
-  browser settings' (colorbox/lightbox), even one that is not valid, always
-  links the image to a bigger version of it.
-
-Minimum image width to display date, location, photographer and optionally
-license info under the caption
-------------------------------
-Suppress extra info on small images. After saving the configuration clear the
-cache. Defaults to 150 px. Set it to 0 px to always include or 999 px to always
-exclude. Adds date, location and photographer info to the caption on images of a
-certain width. The date is in the form of 'time ago'. The photographer's Real
-Name is used, if not available the Username. In the caption it links to the user
-page on Flickr. The license info is optional (see below).
-
-License icon Radio buttons
---------------------------
-- No
-- On the image on mouse-over only (small in the top left corner, on hover).
-  NOTE: Does not display with the Flickr Style 'Enlarge'.
-- On the image (small in the top left corner, always)
-- In the caption
-
-To give proper attribution. Used is the nonintrusive CC icon font in
-'flickr_cc_icons.css'. It links to the corresponding Creative Commons human
-friendly info page. Download it if you prefer to host it yourself locally (CC
-4.0 licensed, give credit somewhere). Extract it in your theme folder and
-substitute the default used remote source that can be found in the module's
-'flickr_cc_icons.css' file. Just replace '//cdn.jsdelivr.net/cc-icons/1.2.0/'
-with '[path to your theme folder]/cc-icons- cc-icons-772e090/'.
-
-License restriction for 'public' queries Radio buttons
-------------------------------------------------------
-- Always restrict 'public' queries to only Creative Commons licensed media.
-- Do not restrict media to Creative Commons licensed on 'public' queries if no
-  results are returned.
-- Do not restrict media to Creative Commons licensed on 'public' queries.
-
-With 'public' queries are intended Flickr requests that do not specify a Flickr
-user or group ID, thus returning results from all public Flickr photos.
-
-Extend the tag filter to search for matching terms also in the Flickr photo
-title and description besides Flickr tags.
-------------------------------------------
-Descriptions are only searched on the album type 'user' (also 'public').
-Checkbox. Shows more results. Can be overridden individually by the filter tag,
-eg. [flickr-user:id=public, size=q, tags=Augusto Canario, extend=true] or in the
-specific configuration of a Flickr block.
-
-Extra links to Flickr maps
---------------------------
-Checkbox. Include extra links to maps available for a user, group or set on
-Flickr. Locations mentioned (if displayed) under individual images link to
-corresponding Flickr user maps in any case, independent on the setting here.
-
-Show a Flickr counter
----------------------
-Checkbox. Shows how many photos are displayed out of the total number available
-for a user, group, set or tags on Flickr. Can be overridden by the filter tag,
-eg. [flickr-photoset:id=72157634563269642, count=false]
-
-Use Google instead of Flickr for location info (reverse geocoding)
-------------------------------------------------------------------
-Checkboxes:
-- In the album title
-- In the photo caption
-
-DATE FORMATS
-
-Select fields of all defined date formats (long, medium, short) plus 'Time ago'
-custom defined by the Flickr module for the following elements:
-
-- When hovering an image (mouse-over)
-- In the image caption
-- When hovering a date in the caption. If you don't want to display anything
-  when hovering the date, select 'None'.
-- In the album title. If the selected date format contains a time, only the date
-  part of it will be used in the album title.
-
-OVERLAY BROWSER (COLORBOX, LIGHTBOX)
-
-Colorbox, Lightbox or alike. Extending Colorbox/Lightbox support to User
-Profiles is still an open issue. Leave these fields empty to link directly to
-the Flickr photo page instead of opening the bigger version of the image.
-
-To have captions, you must fill in the 'class' or 'rel' field. Even if you do
-not intend to use an overlay browser, this is the condition to display a
-caption. This way any sites upgrading the Flickr module do not experience a
-change from the 'old' behaviour, suddenly having unexpected captions. If you
-want captions but don't want to use an overlay browser, just enter for example
-the name of your dog in one of the fields.
-
-class
------
-Use 'colorbox' if you are using Colorbox. With Lightbox you can leave it empty.
-
-rel
----
-Use 'gallery-all' if you are using Colorbox. It can be anything you want,
-really. As long there is something. Use 'lightbox[gallery]' if you are using
-Lightbox2. The part inside the square brackets can be anything you want but must
-be one word without spaces.
-
-NOTE: With Lightbox if you select an 'Automatic image handling' for Flickr
-images, you override the behaviour set here. If you don't want that, leave it
-'Disabled'. Find it at admin/config/user-interface/lightbox2/automatic
-
-Image size to open
-------------------
-The image size to open in the overlay browser when clicking the image. Larger
-sizes make navigating to next and previous pictures slower. TAKE CARE, the c
-(800px) size is missing on Flickr images uploaded before March 1, 2012. Defaults to -: 500 px on
-longest side.
-
-Info to include when enlarging the image in Colorbox, Lightbox or alike
------------------------------------------------------------------------
-Usually this info is displayed under the enlarged image. Checkboxes (multiple
-options can be selected).
-
-- Title
-- Date, location and photographer
-- Description, applies also on the text that shows on mouseover (the image
-  'title' attribute)
-- License info
-
-All selected by default except for 'License info'. This info is concatenated
-with '-' separators and added as the link 'title' attribute. HTML is
-stripped, double quotes are removed (it goes into the title="[description]"
-attribute) and special characters are decoded (&copy; turns into ©). If the
-title and description are identical, only the title is used.
-
-As a side note: The description is always included as the image 'title'
-attribute (shows on hover). If the description is not available the title will
-be used.
-
-STYLING (CSS RELATED)
-
-Use flickr.css
---------------
-Checkbox. Uncheck to take care of the styling yourself in custom CSS. Selected
-by default.
-
-More styling options are available if the submodule Flickr Style is enabled.
-
-ADVANCED
-
-Update interval
----------------
-The refresh interval how often to check if cached Flickr API calls are up to
-date. Defaults to 1 hour.
-
-Limit API requests for random and popularity sort
--------------------------------------------------
-Setting a lower number enhances performance but makes random results being less
-spread between one another (not less random) and returns popular (most viewed on
-Flickr) only for the n most recent. Minimum 20, maximum 500. If you use cache
-warming you can set the maximum (see https://drupal.org/node/1576686).
-
-Use 'cURL' to determine the image width instead of 'fopen' used by the PHP
-function 'getimagesize'
------------------------
-Checkbox (default OFF). Your server configuration now uses 'fopen' for external
-resources (used by 'getimagesize'). 'cURL' might be faster.
-
-Use 'cURL' instead of 'stream_socket_client' (drupal_http_request) to make data
-requests
---------
-Checkbox (default OFF). Otherwise cURL will only be used as fallback when
-drupal_http_request fails.
-
-Enable Debug Output
--------------------
-Radio buttons:
-- None
-- Flickr response only (as a link to an XML page in a debug message)
-- Plus Devel (Flickr response plus additional output)
-
-Display the Flickr XML response, all passed photo/album arguments and HTTP
-requests/response objects via the Devel module.
-
-CACHE WARMER
-
-Only if the submodule Flickr Cache Warmer is enabled.
-
-BLOCK SETTINGS
-
-Smart install of Flickr Block
------------------------------
-Checkbox (default ON). Disabled after install of Flickr Block. On install of
-Flickr Block auto create Flickr taxonomy, date and geo fields on all node types
-to grab Flickr photos related to the node on the same page as a Flickr block
-based on tags, a date or a location. Enable Taxonomy (core), Date (including
-date_popup) and Geofield before enabling Flickr Block for the first time (or
-uninstall it first).
-
-Other options appear only after the submodule Flickr Block is enabled. See
-https://drupal.org/node/2171249#config.
-
-FILTER SETTINGS
-
-Only if the submodule Flickr Filter is enabled. See
-https://drupal.org/node/2171503#config.
-
-
-Other Flickr module specific info for developers can be found at
-https://www.drupal.org/node/2289797
diff --git a/block/INSTALL.md b/block/INSTALL.md
new file mode 100644
index 0000000..2b338a7
--- /dev/null
+++ b/block/INSTALL.md
@@ -0,0 +1,21 @@
+To have dynamic Flickr Blocks that use a node's:
+- taxonomy terms to grab identical tagged photos from Flickr
+- date fields to grab photos taken in the period of a node date
+- location or geofields to grab photos taken near the location of a node
+
+it is recommended to enable before installation or upgrade of the sub-module
+Flickr Block:
+- the core Taxonomy module. It will create a dedicated 'Flickr tags' vocabulary
+  and a preconfigured term reference field. This is optional as any free tagging
+  vocabulary can be used, but convenient as it saves some configuration.
+- the Date Popup module (sub-module of Date). It will create a dedicated 'Flickr
+  date taken' field on nodes.
+- the Geofield module. It will create a dedicated 'Flickr location' field on
+  nodes (latitude/longitude).
+
+To avoid the above mentioned 'smart install':
+- disable the mentioned modules before install of Flickr Block (first time
+  enable or after uninstall)
+OR
+- enable first the Flickr main module and unselect the 'smart install' checkbox
+  at admin/config/media/flickr under 'Block options', then install Flickr Block.
diff --git a/block/INSTALL.txt b/block/INSTALL.txt
deleted file mode 100644
index 2b338a7..0000000
--- a/block/INSTALL.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-To have dynamic Flickr Blocks that use a node's:
-- taxonomy terms to grab identical tagged photos from Flickr
-- date fields to grab photos taken in the period of a node date
-- location or geofields to grab photos taken near the location of a node
-
-it is recommended to enable before installation or upgrade of the sub-module
-Flickr Block:
-- the core Taxonomy module. It will create a dedicated 'Flickr tags' vocabulary
-  and a preconfigured term reference field. This is optional as any free tagging
-  vocabulary can be used, but convenient as it saves some configuration.
-- the Date Popup module (sub-module of Date). It will create a dedicated 'Flickr
-  date taken' field on nodes.
-- the Geofield module. It will create a dedicated 'Flickr location' field on
-  nodes (latitude/longitude).
-
-To avoid the above mentioned 'smart install':
-- disable the mentioned modules before install of Flickr Block (first time
-  enable or after uninstall)
-OR
-- enable first the Flickr main module and unselect the 'smart install' checkbox
-  at admin/config/media/flickr under 'Block options', then install Flickr Block.
diff --git a/block/README.md b/block/README.md
new file mode 100644
index 0000000..65276cb
--- /dev/null
+++ b/block/README.md
@@ -0,0 +1,267 @@
+The content of this file is based on the online documentation that can be found
+at https://drupal.org/node/2171249
+It is recommended to read it there, as it is more detailed.
+
+NAME
+====
+Flickr Block
+Part of the Flickr module. Project page at https://drupal.org/project/flickr
+
+OVERVIEW
+========
+Flickr images or slideshows in blocks to show for example recent or random
+images from a specific user, photoset, gallery or group.
+
+- Configure the size, media type (photo/video) and number of images to show.
+- With visibility by role or path.
+- Blocks can be placed in any theme region.
+
+There are several blocks that show the Flickr photos of a corresponding node
+author 'dynamically' and appear on posts written by the user and on their user
+profile pages. To avoid that, change the block settings to exclude 'node/*'
+pages or show them only on 'user/*' pages.
+
+Of course you can do it also the other way around to show a block only on a node
+page. You can fine-grain it even more by selecting only a certain content type
+you want to show them on, for example blog posts.
+
+- Node author favorites (what they like from others, but all together)
+  optionally corresponding with a node's taxonomy term
+- Node author gallery photos (arbitrary selection by author of other's photos)
+  optionally with gallery title as term from node
+- Node author photos optionally corresponding with a node's taxonomy term,
+  location and/or date field
+- Node author recent photosets
+
+The node author has to have permission to specify a Flickr ID on their own
+account (admin/people/permissions#module-flickr).
+
+The block visibility setting for the 'Node author' blocks are not only
+restricted by the sitebuilder in the block configuration but also by the module.
+The block gets displayed when the first argument of the path is 'user' or 'node'
+and a specific uid is available.
+
+Furthermore several sitewide blocks are available. A user, photoset, gallery or
+group needs to be specified in the block configuration.
+
+- Favorites corresponding with a node's taxonomy term
+- Group photos corresponding with a node's taxonomy term, location and/or date
+  field
+- Set photos corresponding with a node's taxonomy term
+- User photos corresponding with a node's taxonomy term, location and/or date
+  field
+- User photos with specific tags
+- User recent photosets
+
+INSTALLATION / UPGRADING
+========================
+To have dynamic Flickr Blocks that use a node's:
+- taxonomy terms to grab identical tagged photos from Flickr
+- date fields to grab photos taken in the period of a node date
+- location or geofields to grab photos taken near the location of a node
+
+it is recommended to enable before installation or upgrade of the sub-module
+Flickr Block:
+- the core Taxonomy module. It will create a dedicated 'Flickr tags' vocabulary
+  and a preconfigured term reference field. This is optional as any free tagging
+  vocabulary can be used, but convenient as it saves some configuration.
+- the Date Popup module (sub-module of Date). It will create a dedicated 'Flickr
+  date taken' field on nodes.
+- the Geofield module. It will create a dedicated 'Flickr location' field on
+  nodes (latitude/longitude).
+
+To avoid the above mentioned 'smart install':
+- disable the mentioned modules before install of Flickr Block (first time
+  enable or after uninstall)
+OR
+- enable first the Flickr main module and unselect the 'smart install' checkbox
+  at admin/config/media/flickr under 'Block options', then install Flickr Block.
+
+
+BLOCK CONFIGURATION
+===================
+Fields in the block settings that apply on all blocks.
+======================================================
+Block title
+-----------
+This is an extra block title that normally stays empty as a title is already
+added that shows info about e.g. the photo order, the tags used to filter on,
+the album title, location, date range and Flickr user. You can suppress this
+title with CSS, e.g for the 'Flickr: User photos with specific tags' block
+($delta=11):
+
+#block-flickr-11 .flickr-album-heading {
+  display: none;
+}
+
+Show n photos (field group 'Display')
+-------------------------------------
+The block will display this many photos.
+
+Size of photos (field group 'Display')
+--------------------------------------
+Select the size of photos you'd like to display in the block.
+NOTE:
+For square images ('s': 75px and 'q': 150px) no real width needs to be fetched,
+giving it a slight performance advantage over other sizes. Recommended if you
+include many images.
+
+Use size=x for a slideshow over the full region width (responsive). Size=y
+for a basic version.
+
+Minimum image width to display a title caption (field group 'Display')
+----------------------------------------------------------------------
+Small images have liitle space for a title caption. Replace it with the text
+'Flickr' that links to the photo page on Flickr to comply with their Guidelines.
+Set it to '0 px' to always include or '999 px' to always exclude. To give proper
+attribution this should be included (space allowing).
+
+Minimum image width to display date, location, photographer and optionally
+license info under the caption (field group 'Display')
+------------------------------------------------------
+Suppress extra info on small images. Set it to '0 px' to always include or '999
+px' to always exclude. To give proper attribution this should be included (space
+allowing).
+
+Media type (field group 'Filter / sort order')
+----------------------------------------------
+- all
+- photos (default)
+- videos
+
+Note that for videos a still image representing the video is shown. If you use
+Colorbox it can be played with the possibility to toggle to fullscreen. See
+https://drupal.org/node/2226579#video.
+
+All 'User' and 'Group' blocks.
+==============================
+Flickr User or Group ID
+-----------------------
+A valid Flickr User ID, alias, username or email address. If this is left blank,
+the site's default user will be used if set. Emails or usernames (that might
+change at any given time) are internally (in the variable) replaced with a
+stable NSID (Flickr ID number). These are rendered in this field as Flickr
+usernames. 'Maria Emanuela' is human readable, '43937662@N05' is not. Internal
+the module still uses the Flickr ID number as it is more reliable.
+
+For groups the ID (number) or alias can be used.
+
+All 'corresponding with a node's taxonomy term' blocks.
+=======================================================
+Flickr tags as node taxonomy terms (choose a vocabulary to use) (field group
+'Filter / sort order')
+----------------------
+Limit the Flickr images to those that have a Flickr tag identical to the terms
+found for the node on the page the block is displayed on of a specific
+vocabulary. Case insensitive, matches any tag, for photosets even partial.
+Multiple tags for groups will only query the last 500 photos on Flickr (slowest
+API request). For user blocks the Flickr account of the node author will be
+queried. Flickr removes spaces from multi word tags (e.g. 'beach trip' becomes
+'beachtrip'). Multi word tags in Drupal can be used as spaces are stripped to
+make a Flickr request. For your content type, adjust the Help text of the used
+taxonomy field accordingly (e.g. at
+admin/structure/types/manage/article/fields/field_tags). The recommended widget
+type is Autocomplete term widget (tagging) with an unlimited number of values.
+If taxonomy was active at the moment of install, a vocabulary Flickr tags is
+already configured right by default. You should find Flickr tags as a Term
+reference field on your content type. It works out-of-the-box. If not on a node
+page, all photos will be displayed. To avoid this set the visibility settings
+below to Only the listed pages specified as node/*. Note that if you add this
+term reference field to user profiles at admin/config/people/accounts/fields it
+will filter additionally on it for user blocks. E.g. a user can set individually
+that from their account only photos tagged 'website' should be used to embed,
+independent from other used tags. Does apply only on user blocks, except for
+favorites.
+
+Checkbox: Extend to search for matching terms also in the Flickr photo title and
+description besides Flickr tags. This limits the tag mode below to 'any' (OR).
+(field group 'Filter / sort order')
+-----------------------------------
+Shows more results if true.
+
+Radios: Tag mode (field group 'Filter / sort order')
+----------------------------------------------------
+- Any (OR)
+- All (AND)
+- All (AND) for public searches, any (OR) if a Flickr user ID is known.
+Either 'any' for an OR operator between tags, 'all' for an AND operator or
+depending on the context.
+
+All 'corresponding with a node's location and/or date field' blocks.
+====================================================================
+Location or geofield (choose a field machine name to use)
+(field group 'Filter / sort order')
+-----------------------------------
+Limit the Flickr images to those that have a geo location near to the geofield
+found for the node on the page the block is displayed on. If not on a node page,
+all photos will be displayed. To avoid this set the visibility settings below to
+Only the listed pages specified as node/*.
+
+Date field (choose a field machine name to use)
+(field group 'Filter / sort order')
+-----------------------------------
+Limit the Flickr images to those that are taken on or between the dates attached
+to the node on the page the block is displayed on. If not on a node page, all
+photos will be displayed. To avoid this set the visibility settings below to
+Only the listed pages specified as node/*.
+
+Site wide block settings
+========================
+Generic block configuration settings can be found in an own section at
+admin/config/media/flickr. Most options are only available if the sub-module
+Flickr Block is enabled.
+
+BLOCK SETTINGS (field group)
+----------------------------
+
+Smart install of Flickr Block
+-----------------------------
+A checkbox (default ON). Disabled after enabling Flickr Block.
+On install of Flickr Block auto create Flickr taxonomy, date and geo fields on
+all node types to grab Flickr photos related to the node on the same page as a
+Flickr block based on tags, a date or a location. Enable Taxonomy (core), Date
+(including date_popup) and Geofield before enabling Flickr Block for the first
+time (or uninstall it first).
+
+Hide empty blocks (no media found)
+----------------------------------
+A checkbox. Default OFF, mainly to make sure you can access the contextual
+links. That little wheel you see when you hover over blocks to edit them in
+place. It is recommended to hide empty blocks once you have set up the blocks
+you need. Indispensable if you use blocks that dynamically show photos with
+Flickr tags being similar to terms attached to a node.
+
+Wrap the album title in an HTML heading tag (only for blocks)
+-------------------------------------------------------------
+Use 'p' for no style, e.g. 'h2' for a heading style or 'none' to not display an
+album title. Use your browser inspector to see how other blocks are styled.
+
+Refresh rates
+-------------
+It is recommended to set two different refresh values for random (default 23
+hours) and other blocks (default 31 hours) to avoid they refresh all together.
+Lower values impact performance negatively. Consider to use cache warming.
+
+Number of photos per set
+------------------------
+How many photos display per set on blocks that display multiple photosets.
+
+Node author blocks
+==================
+You find instructions targeted to editors that don't have block administer
+permissions at https://drupal.org/node/2279003#block. They can make use of the
+'Node author' blocks to show photos of their Flickr account that have Flickr
+tags similar to taxonomy terms they attach to a node they write. This way they
+are able to add matching Flickr photos with their posts without the hassle of
+uploading them on the site. Remember to give site editors also the permission to
+specify a Flickr identifier on their account.
+
+A Flickr Block inside the node body
+===================================
+Use Block Inject to put a Flickr Block inside your node body.
+
+Create new Flickr blocks
+========================
+You can create new Flickr blocks also through admin/structure/block/add, using
+the Text format that contains the Flickr Filter. See
+https://www.drupal.org/node/2171503#blocks.
diff --git a/block/README.txt b/block/README.txt
deleted file mode 100644
index 65276cb..0000000
--- a/block/README.txt
+++ /dev/null
@@ -1,267 +0,0 @@
-The content of this file is based on the online documentation that can be found
-at https://drupal.org/node/2171249
-It is recommended to read it there, as it is more detailed.
-
-NAME
-====
-Flickr Block
-Part of the Flickr module. Project page at https://drupal.org/project/flickr
-
-OVERVIEW
-========
-Flickr images or slideshows in blocks to show for example recent or random
-images from a specific user, photoset, gallery or group.
-
-- Configure the size, media type (photo/video) and number of images to show.
-- With visibility by role or path.
-- Blocks can be placed in any theme region.
-
-There are several blocks that show the Flickr photos of a corresponding node
-author 'dynamically' and appear on posts written by the user and on their user
-profile pages. To avoid that, change the block settings to exclude 'node/*'
-pages or show them only on 'user/*' pages.
-
-Of course you can do it also the other way around to show a block only on a node
-page. You can fine-grain it even more by selecting only a certain content type
-you want to show them on, for example blog posts.
-
-- Node author favorites (what they like from others, but all together)
-  optionally corresponding with a node's taxonomy term
-- Node author gallery photos (arbitrary selection by author of other's photos)
-  optionally with gallery title as term from node
-- Node author photos optionally corresponding with a node's taxonomy term,
-  location and/or date field
-- Node author recent photosets
-
-The node author has to have permission to specify a Flickr ID on their own
-account (admin/people/permissions#module-flickr).
-
-The block visibility setting for the 'Node author' blocks are not only
-restricted by the sitebuilder in the block configuration but also by the module.
-The block gets displayed when the first argument of the path is 'user' or 'node'
-and a specific uid is available.
-
-Furthermore several sitewide blocks are available. A user, photoset, gallery or
-group needs to be specified in the block configuration.
-
-- Favorites corresponding with a node's taxonomy term
-- Group photos corresponding with a node's taxonomy term, location and/or date
-  field
-- Set photos corresponding with a node's taxonomy term
-- User photos corresponding with a node's taxonomy term, location and/or date
-  field
-- User photos with specific tags
-- User recent photosets
-
-INSTALLATION / UPGRADING
-========================
-To have dynamic Flickr Blocks that use a node's:
-- taxonomy terms to grab identical tagged photos from Flickr
-- date fields to grab photos taken in the period of a node date
-- location or geofields to grab photos taken near the location of a node
-
-it is recommended to enable before installation or upgrade of the sub-module
-Flickr Block:
-- the core Taxonomy module. It will create a dedicated 'Flickr tags' vocabulary
-  and a preconfigured term reference field. This is optional as any free tagging
-  vocabulary can be used, but convenient as it saves some configuration.
-- the Date Popup module (sub-module of Date). It will create a dedicated 'Flickr
-  date taken' field on nodes.
-- the Geofield module. It will create a dedicated 'Flickr location' field on
-  nodes (latitude/longitude).
-
-To avoid the above mentioned 'smart install':
-- disable the mentioned modules before install of Flickr Block (first time
-  enable or after uninstall)
-OR
-- enable first the Flickr main module and unselect the 'smart install' checkbox
-  at admin/config/media/flickr under 'Block options', then install Flickr Block.
-
-
-BLOCK CONFIGURATION
-===================
-Fields in the block settings that apply on all blocks.
-======================================================
-Block title
------------
-This is an extra block title that normally stays empty as a title is already
-added that shows info about e.g. the photo order, the tags used to filter on,
-the album title, location, date range and Flickr user. You can suppress this
-title with CSS, e.g for the 'Flickr: User photos with specific tags' block
-($delta=11):
-
-#block-flickr-11 .flickr-album-heading {
-  display: none;
-}
-
-Show n photos (field group 'Display')
--------------------------------------
-The block will display this many photos.
-
-Size of photos (field group 'Display')
---------------------------------------
-Select the size of photos you'd like to display in the block.
-NOTE:
-For square images ('s': 75px and 'q': 150px) no real width needs to be fetched,
-giving it a slight performance advantage over other sizes. Recommended if you
-include many images.
-
-Use size=x for a slideshow over the full region width (responsive). Size=y
-for a basic version.
-
-Minimum image width to display a title caption (field group 'Display')
-----------------------------------------------------------------------
-Small images have liitle space for a title caption. Replace it with the text
-'Flickr' that links to the photo page on Flickr to comply with their Guidelines.
-Set it to '0 px' to always include or '999 px' to always exclude. To give proper
-attribution this should be included (space allowing).
-
-Minimum image width to display date, location, photographer and optionally
-license info under the caption (field group 'Display')
-------------------------------------------------------
-Suppress extra info on small images. Set it to '0 px' to always include or '999
-px' to always exclude. To give proper attribution this should be included (space
-allowing).
-
-Media type (field group 'Filter / sort order')
-----------------------------------------------
-- all
-- photos (default)
-- videos
-
-Note that for videos a still image representing the video is shown. If you use
-Colorbox it can be played with the possibility to toggle to fullscreen. See
-https://drupal.org/node/2226579#video.
-
-All 'User' and 'Group' blocks.
-==============================
-Flickr User or Group ID
------------------------
-A valid Flickr User ID, alias, username or email address. If this is left blank,
-the site's default user will be used if set. Emails or usernames (that might
-change at any given time) are internally (in the variable) replaced with a
-stable NSID (Flickr ID number). These are rendered in this field as Flickr
-usernames. 'Maria Emanuela' is human readable, '43937662@N05' is not. Internal
-the module still uses the Flickr ID number as it is more reliable.
-
-For groups the ID (number) or alias can be used.
-
-All 'corresponding with a node's taxonomy term' blocks.
-=======================================================
-Flickr tags as node taxonomy terms (choose a vocabulary to use) (field group
-'Filter / sort order')
-----------------------
-Limit the Flickr images to those that have a Flickr tag identical to the terms
-found for the node on the page the block is displayed on of a specific
-vocabulary. Case insensitive, matches any tag, for photosets even partial.
-Multiple tags for groups will only query the last 500 photos on Flickr (slowest
-API request). For user blocks the Flickr account of the node author will be
-queried. Flickr removes spaces from multi word tags (e.g. 'beach trip' becomes
-'beachtrip'). Multi word tags in Drupal can be used as spaces are stripped to
-make a Flickr request. For your content type, adjust the Help text of the used
-taxonomy field accordingly (e.g. at
-admin/structure/types/manage/article/fields/field_tags). The recommended widget
-type is Autocomplete term widget (tagging) with an unlimited number of values.
-If taxonomy was active at the moment of install, a vocabulary Flickr tags is
-already configured right by default. You should find Flickr tags as a Term
-reference field on your content type. It works out-of-the-box. If not on a node
-page, all photos will be displayed. To avoid this set the visibility settings
-below to Only the listed pages specified as node/*. Note that if you add this
-term reference field to user profiles at admin/config/people/accounts/fields it
-will filter additionally on it for user blocks. E.g. a user can set individually
-that from their account only photos tagged 'website' should be used to embed,
-independent from other used tags. Does apply only on user blocks, except for
-favorites.
-
-Checkbox: Extend to search for matching terms also in the Flickr photo title and
-description besides Flickr tags. This limits the tag mode below to 'any' (OR).
-(field group 'Filter / sort order')
------------------------------------
-Shows more results if true.
-
-Radios: Tag mode (field group 'Filter / sort order')
-----------------------------------------------------
-- Any (OR)
-- All (AND)
-- All (AND) for public searches, any (OR) if a Flickr user ID is known.
-Either 'any' for an OR operator between tags, 'all' for an AND operator or
-depending on the context.
-
-All 'corresponding with a node's location and/or date field' blocks.
-====================================================================
-Location or geofield (choose a field machine name to use)
-(field group 'Filter / sort order')
------------------------------------
-Limit the Flickr images to those that have a geo location near to the geofield
-found for the node on the page the block is displayed on. If not on a node page,
-all photos will be displayed. To avoid this set the visibility settings below to
-Only the listed pages specified as node/*.
-
-Date field (choose a field machine name to use)
-(field group 'Filter / sort order')
------------------------------------
-Limit the Flickr images to those that are taken on or between the dates attached
-to the node on the page the block is displayed on. If not on a node page, all
-photos will be displayed. To avoid this set the visibility settings below to
-Only the listed pages specified as node/*.
-
-Site wide block settings
-========================
-Generic block configuration settings can be found in an own section at
-admin/config/media/flickr. Most options are only available if the sub-module
-Flickr Block is enabled.
-
-BLOCK SETTINGS (field group)
-----------------------------
-
-Smart install of Flickr Block
------------------------------
-A checkbox (default ON). Disabled after enabling Flickr Block.
-On install of Flickr Block auto create Flickr taxonomy, date and geo fields on
-all node types to grab Flickr photos related to the node on the same page as a
-Flickr block based on tags, a date or a location. Enable Taxonomy (core), Date
-(including date_popup) and Geofield before enabling Flickr Block for the first
-time (or uninstall it first).
-
-Hide empty blocks (no media found)
-----------------------------------
-A checkbox. Default OFF, mainly to make sure you can access the contextual
-links. That little wheel you see when you hover over blocks to edit them in
-place. It is recommended to hide empty blocks once you have set up the blocks
-you need. Indispensable if you use blocks that dynamically show photos with
-Flickr tags being similar to terms attached to a node.
-
-Wrap the album title in an HTML heading tag (only for blocks)
--------------------------------------------------------------
-Use 'p' for no style, e.g. 'h2' for a heading style or 'none' to not display an
-album title. Use your browser inspector to see how other blocks are styled.
-
-Refresh rates
--------------
-It is recommended to set two different refresh values for random (default 23
-hours) and other blocks (default 31 hours) to avoid they refresh all together.
-Lower values impact performance negatively. Consider to use cache warming.
-
-Number of photos per set
-------------------------
-How many photos display per set on blocks that display multiple photosets.
-
-Node author blocks
-==================
-You find instructions targeted to editors that don't have block administer
-permissions at https://drupal.org/node/2279003#block. They can make use of the
-'Node author' blocks to show photos of their Flickr account that have Flickr
-tags similar to taxonomy terms they attach to a node they write. This way they
-are able to add matching Flickr photos with their posts without the hassle of
-uploading them on the site. Remember to give site editors also the permission to
-specify a Flickr identifier on their account.
-
-A Flickr Block inside the node body
-===================================
-Use Block Inject to put a Flickr Block inside your node body.
-
-Create new Flickr blocks
-========================
-You can create new Flickr blocks also through admin/structure/block/add, using
-the Text format that contains the Flickr Filter. See
-https://www.drupal.org/node/2171503#blocks.
diff --git a/block/config/flickr_block.settings.json b/block/config/flickr_block.settings.json
new file mode 100644
index 0000000..0d59665
--- /dev/null
+++ b/block/config/flickr_block.settings.json
@@ -0,0 +1,8 @@
+{
+  "_config_name": "flickr_block.settings",
+  "flickr_block_refresh_random": 23,
+  "flickr_block_refresh_others": 31,
+  "flickr_block_heading": "h2",
+  "flickr_block_hide_empty": 0,
+  "flickr_block_photos_per_set": 6
+}
diff --git a/block/flickr_block.admin.inc b/block/flickr_block.admin.inc
index 2ccc42b..8c6b2fc 100644
--- a/block/flickr_block.admin.inc
+++ b/block/flickr_block.admin.inc
@@ -12,14 +12,14 @@ function flickr_block_form_flickr_admin_settings_alter(&$form, &$form_state) {
   $form['block_settings']['flickr_block_hide_empty'] = array(
     '#type' => 'checkbox',
     '#title' => t('Hide empty blocks (no media found)'),
-    '#default_value' => variable_get('flickr_block_hide_empty', 0),
+    '#default_value' => config_get('flickr_block.settings', 'flickr_block_hide_empty'),
     '#description' => t("Uncheck to see the block title and to access the contextual links. That little wheel you see when you hover over blocks to edit them in place."),
   );
   $form['block_settings']['flickr_block_heading'] = array(
     '#type' => 'textfield',
     '#title' => t('Wrap the album title in an HTML heading tag (only for blocks)'),
     '#required' => TRUE,
-    '#default_value' => variable_get('flickr_block_heading', 'h2'),
+    '#default_value' => config_get('flickr_block.settings', 'flickr_block_heading'),
     '#description' => t("Use 'p' for no style, e.g. 'h2' for a heading or 'none' to not display an album title."),
     '#size' => 4,
     '#maxlength' => 4,
@@ -28,7 +28,7 @@ function flickr_block_form_flickr_admin_settings_alter(&$form, &$form_state) {
     '#type' => 'textfield',
     '#field_prefix' => t('Refresh random blocks every'),
     '#required' => TRUE,
-    '#default_value' => variable_get('flickr_block_refresh_random', 23),
+    '#default_value' => config_get('flickr_block.settings', 'flickr_block_refresh_random'),
     '#field_suffix' => t('hours.'),
     '#size' => 3,
     '#maxlength' => 3,
@@ -43,7 +43,7 @@ function flickr_block_form_flickr_admin_settings_alter(&$form, &$form_state) {
     '#type' => 'textfield',
     '#field_prefix' => t('Refresh other blocks every'),
     '#required' => TRUE,
-    '#default_value' => variable_get('flickr_block_refresh_others', 31),
+    '#default_value' => config_get('flickr_block.settings', 'flickr_block_refresh_others'),
     '#description' => t('It is recommended to set two different refresh values to avoid all blocks refresh together. Lower values impact performance negatively. Consider to use !cache_warming.', array('!cache_warming' => $cache_warming)),
     '#field_suffix' => t('hours.'),
     '#size' => 3,
@@ -53,7 +53,7 @@ function flickr_block_form_flickr_admin_settings_alter(&$form, &$form_state) {
     '#type' => 'textfield',
     '#title' => t('Number of photos per set'),
     '#required' => TRUE,
-    '#default_value' => variable_get('flickr_block_photos_per_set', 6),
+    '#default_value' => config_get('flickr_block.settings', 'flickr_block_photos_per_set'),
     '#description' => t('How many photos display per set on blocks that display multiple photosets. Clear the cache on form submit.'),
     '#size' => 2,
     '#maxlength' => 2,
diff --git a/block/flickr_block.info b/block/flickr_block.info
index 6a099cf..576083a 100644
--- a/block/flickr_block.info
+++ b/block/flickr_block.info
@@ -1,7 +1,8 @@
 name = Flickr Block
 description = Display Flickr images in blocks to show recent or random images from a user, set or group.
-core = 7.x
+type = module
+backdrop = 1.x
 package = Flickr
-configure = admin/structure/block
+configure = admin/structure/layouts/manage/default
 dependencies[] = flickr
 dependencies[] = block
diff --git a/block/flickr_block.install b/block/flickr_block.install
index 2678b60..51a9f50 100644
--- a/block/flickr_block.install
+++ b/block/flickr_block.install
@@ -9,12 +9,37 @@
  */
 function flickr_block_install() {
   $t = get_t();
-  if (function_exists('taxonomy_vocabulary_machine_name_load') && variable_get('flickr_smart', 1)) {
-    $vocab = (object) array(
+  // Create block config setting for all delta's.
+  foreach (range(0, 16) as $delta) {
+    $config = config('flickr_block.settings');
+    $config->set('flickr_block_' . $delta, array(
+      'user_id' => '',
+      'group_id' => '',
+      'photoset_id' => '',
+      'show_n' => config_get('flickr.settings', 'flickr_photos_per_page'),
+      'size' => config_get('flickr.settings', 'flickr_default_size_album'),
+      'tag' => '',
+      'sort' => 'unsorted',
+      'filter' => '',
+      'media' => 'photos',
+      'vocab' => '',
+      'geo' => '',
+      'date' => '',
+      'extend' => config_get('flickr.settings', 'flickr_extend'),
+      'tag_mode' => 'context',
+      'min_title' => config_get('flickr.settings', 'flickr_title_suppress_on_small'),
+      'min_metadata' => config_get('flickr.settings', 'flickr_metadata_suppress_on_small'),
+    ));
+  }
+  $config->save();
+
+  if (function_exists('taxonomy_vocabulary_machine_name_load') && config_get('flickr.settings', 'flickr_smart') && !db_table_exists('field_data_field_flickr_tags')) {
+    $vocab = new TaxonomyVocabulary(array(
       'name' => 'Flickr tags',
       'machine_name' => 'flickr_tags',
       'description' => $t('Grab Flickr photos with these tags only. Comma separated. You can exclude results that match a term by prepending it with a - character.'),
-    );
+      'module' => 'flickr_block',
+    ));
     taxonomy_vocabulary_save($vocab);
 
     $vocabulary = taxonomy_vocabulary_machine_name_load('flickr_tags');
@@ -87,13 +112,13 @@ function flickr_block_install() {
       field_create_instance($instance);
     }
     foreach (range(0, 16) as $delta) {
-      variable_set('flickr_block_' . $delta, array(
+      config_set('flickr_block.settings', 'flickr_block_' . $delta, array(
         'vocab' => $vocabulary->vid,
       ));
     }
   }
 
-  if (module_exists('date_popup') && variable_get('flickr_smart', 1)) {
+  if (module_exists('date_popup') && config_get('flickr.settings', 'flickr_smart') && !db_table_exists('field_data_field_flickr_date')) {
     $field = array(
       'field_name' => 'field_flickr_date',
       'type' => 'datetime',
@@ -160,7 +185,7 @@ function flickr_block_install() {
 
     if (isset($vocabulary)) {
       foreach (range(0, 16) as $delta) {
-        variable_set('flickr_block_' . $delta, array(
+        config_set('flickr_block.settings', 'flickr_block_' . $delta, array(
           'vocab' => $vocabulary->vid,
           'date' => 'field_flickr_date',
         ));
@@ -168,14 +193,14 @@ function flickr_block_install() {
     }
     else {
       foreach (range(0, 16) as $delta) {
-        variable_set('flickr_block_' . $delta, array(
+        config_set('flickr_block.settings', 'flickr_block_' . $delta, array(
           'date' => 'field_flickr_date',
         ));
       }
     }
   }
 
-  if (module_exists('geofield') && variable_get('flickr_smart', 1)) {
+  if (module_exists('geofield') && config_get('flickr.settings', 'flickr_smart') && !db_table_exists('field_data_field_flickr_geo')) {
     $field = array(
       'translatable' => '0',
       'settings' => array(
@@ -232,7 +257,7 @@ function flickr_block_install() {
 
     if (isset($vocabulary) && module_exists('date_popup')) {
       foreach (range(0, 16) as $delta) {
-        variable_set('flickr_block_' . $delta, array(
+        config_set('flickr_block.settings', 'flickr_block_' . $delta, array(
           'vocab' => $vocabulary->vid,
           'date' => 'field_flickr_date',
           'geo' => 'field_flickr_geo',
@@ -241,7 +266,7 @@ function flickr_block_install() {
     }
     elseif (module_exists('date_popup')) {
       foreach (range(0, 16) as $delta) {
-        variable_set('flickr_block_' . $delta, array(
+        config_set('flickr_block.settings', 'flickr_block_' . $delta, array(
           'date' => 'field_flickr_date',
           'geo' => 'field_flickr_geo',
         ));
@@ -249,406 +274,23 @@ function flickr_block_install() {
     }
     else {
       foreach (range(0, 16) as $delta) {
-        variable_set('flickr_block_' . $delta, array(
+        config_set('flickr_block.settings', 'flickr_block_' . $delta, array(
           'geo' => 'field_flickr_geo',
         ));
       }
     }
   }
-  // We create the variable used to detect if the module has not been
-  // uninstalled elsewhere. This variable should exist right away.
-  variable_set('flickr_block_photos_per_set', 6);
 }
 
 /**
- * New vocabulary flickr_tags, extra block variable indexes, removes old vars.
- */
-function flickr_block_update_7101() {
-  $t = get_t();
-  if (function_exists('taxonomy_vocabulary_machine_name_load')) {
-    $vocab = (object) array(
-      'name' => 'Flickr tags',
-      'machine_name' => 'flickr_tags',
-      'description' => $t('Grab Flickr photos with these tags only. Comma separated.'),
-    );
-    taxonomy_vocabulary_save($vocab);
-
-    $vocabulary = taxonomy_vocabulary_machine_name_load('flickr_tags');
-
-    $field = array(
-      'field_name' => 'field_' . $vocabulary->machine_name,
-      'type' => 'taxonomy_term_reference',
-      'cardinality' => FIELD_CARDINALITY_UNLIMITED,
-      'settings' => array(
-        'allowed_values' => array(
-          array(
-            'vocabulary' => $vocabulary->machine_name,
-            'parent' => 0,
-          ),
-        ),
-      ),
-    );
-    field_create_field($field);
-
-    $bundles = field_info_bundles($entity_type = 'node');
-    foreach ($bundles as $bundle => $value) {
-      $instance = array(
-        'field_name' => 'field_' . $vocabulary->machine_name,
-        'entity_type' => 'node',
-        'label' => $vocabulary->name,
-        'bundle' => $bundle,
-        'description' => $vocabulary->description,
-        // Use the taxonomy autocomplete widget.
-        'widget' => array(
-          'type' => 'taxonomy_autocomplete',
-          'weight' => 4,
-        ),
-        // Define how the terms will be displayed in full node and teaser mode.
-        'display' => array(
-          'default' => array(
-            'label' => 'inline',
-            'type' => 'taxonomy_term_reference_link',
-            'weight' => 10,
-          ),
-          'teaser' => array(
-            'type' => 'hidden',
-            'weight' => 10,
-          ),
-        ),
-      );
-      field_create_instance($instance);
-    }
-
-    $bundles = field_info_bundles($entity_type = 'user');
-    foreach ($bundles as $bundle => $value) {
-      $instance = array(
-        'field_name' => 'field_' . $vocabulary->machine_name,
-        'entity_type' => 'user',
-        'label' => $vocabulary->name,
-        'bundle' => $bundle,
-        'description' => $t("Limited the photos used from your Flickr account in Flickr blocks to those having a Flickr tag as indicated here (e.g. 'website' or 'blog'). Those have to be added to individual photos on Flickr as well. This is not necessary if the Flickr blocks themselves make use of the Flickr tags attached to a post, as the grabbed photos are filtered by those already."),
-        // Use the taxonomy autocomplete widget.
-        'widget' => array(
-          'type' => 'taxonomy_autocomplete',
-          'weight' => 4,
-        ),
-        // Define how the terms will be displayed on the user profile.
-        'display' => array(
-          'default' => array(
-            'type' => 'hidden',
-            'weight' => 10,
-          ),
-        ),
-      );
-      field_create_instance($instance);
-    }
-
-  }
-
-  foreach (range(0, 11) as $delta) {
-    $block_vars = variable_get("flickr_block_{$delta}", array(
-      'user_id' => '',
-      'group_id' => '',
-      'photoset_id' => '',
-      'show_n' => variable_get('flickr_photos_per_page', 6),
-      'size' => variable_get('flickr_default_size_album', 's'),
-      'tag' => '',
-      'media' => 'photos',
-      'vocab' => '',
-      'min_title' => variable_get('flickr_title_suppress_on_small', '100'),
-      'min_metadata' => variable_get('flickr_metadata_suppress_on_small', '150'),
-    ));
-    $block_vars['user_id'] = isset($block_vars['user_id']) ? $block_vars['user_id'] : '';
-    $block_vars['show_n'] = isset($block_vars['show_n']) ? $block_vars['show_n'] : variable_get('flickr_photos_per_page', 6);
-    $block_vars['size'] = isset($block_vars['size']) ? $block_vars['size'] : variable_get('flickr_default_size_album', 's');
-    $block_vars['tag'] = isset($block_vars['tag']) ? $block_vars['tag'] : '';
-    if (!isset($block_vars['group_id']) && !isset($block_vars['user_id'])) {
-      $block_vars['group_id'] = '';
-    }
-    else {
-      // In older versions user_id was used to hold the group_id.
-      $block_vars['group_id'] = (!isset($block_vars['group_id']) && isset($block_vars['user_id'])) ? $block_vars['user_id'] : $block_vars['group_id'];
-    }
-    $block_vars['photoset_id'] = isset($block_vars['photoset_id']) ? $block_vars['photoset_id'] : '';
-    $block_vars['sort'] = isset($block_vars['sort']) ? $block_vars['sort'] : 'unsorted';
-    $block_vars['filter'] = isset($block_vars['filter']) ? $block_vars['filter'] : '';
-    $block_vars['media'] = isset($block_vars['media']) ? $block_vars['media'] : 'photos';
-    $block_vars['vocab'] = isset($block_vars['vocab']) ? $block_vars['vocab'] : '';
-    $block_vars['min_title'] = isset($block_vars['min_title']) ? $block_vars['min_title'] : variable_get('flickr_title_suppress_on_small', '100');
-    $block_vars['min_metadata'] = isset($block_vars['min_metadata']) ? $block_vars['min_metadata'] : variable_get('flickr_metadata_suppress_on_small', '150');
-    variable_set('flickr_block_' . $delta, array(
-      'user_id' => $block_vars['user_id'],
-      'show_n' => $block_vars['show_n'],
-      'size' => $block_vars['size'],
-      'tag' => $block_vars['tag'],
-      'group_id' => $block_vars['group_id'],
-      'photoset_id' => $block_vars['photoset_id'],
-      'sort' => $block_vars['sort'],
-      'filter' => $block_vars['filter'],
-      'media' => $block_vars['media'],
-      'vocab' => $block_vars['vocab'],
-      'min_title' => $block_vars['min_title'],
-      'min_metadata' => $block_vars['min_metadata'],
-    ));
-    unset($block_vars);
-  }
-  variable_del("flickr_block_counter");
-  variable_del("flickr_block_maps");
-}
-
-/**
- * Create Flickr node fields if the Date (Popup) or Geofield module is enabled.
- */
-function flickr_block_update_7102() {
-  $t = get_t();
-  if (module_exists('date_popup')) {
-    $field = array(
-      'field_name' => 'field_flickr_date',
-      'type' => 'datetime',
-      'cardinality' => 1,
-      'settings' => array(
-        'repeat' => 0,
-        'todate' => 'optional',
-        'granularity' => array(
-          'year' => 'year',
-          'month' => 'month',
-          'day' => 'day',
-        ),
-        'tz_handling' => 'none',
-        'timezone_db' => '',
-        'cache_enabled' => 1,
-        'cache_count' => 2,
-      ),
-    );
-    field_create_field($field);
-
-    $bundles = field_info_bundles($entity_type = 'node');
-    foreach ($bundles as $bundle => $value) {
-      $instance = array(
-        'field_name' => 'field_flickr_date',
-        'entity_type' => 'node',
-        'label' => $t('Flickr date taken'),
-        'bundle' => $bundle,
-        'description' => $t('Grab Flickr photos taken on or between these dates only.'),
-        'widget' => array(
-          'type' => 'date_popup',
-          'weight' => 5,
-          'settings' => array(
-            'input_format' => 'Y-m-d H:i:s',
-            'year_range' => '-100:+1',
-            'increment' => 1,
-          ),
-        ),
-        // Define how the terms will be displayed in full node and teaser mode.
-        'display' => array(
-          'default' => array(
-            'type' => 'date_default',
-            'format_type' => 'long',
-            'settings' => array(
-              'format_type' => 'long',
-              'show_repeat_rule' => 'show',
-              'multiple_number' => '',
-              'multiple_from' => '',
-              'multiple_to'  => '',
-              'fromto' => 'both',
-            ),
-          ),
-          'teaser' => array(
-            'type' => 'hidden',
-            'weight' => 10,
-          ),
-        ),
-        'settings' => array(
-          'default_value' => 'blank',
-          'default_value2' => 'blank',
-        ),
-      );
-      field_create_instance($instance);
-    }
-
-    if (isset($vocabulary)) {
-      foreach (range(0, 16) as $delta) {
-        variable_set('flickr_block_' . $delta, array(
-          'vocab' => $vocabulary->vid,
-          'date' => 'field_flickr_date',
-        ));
-      }
-    }
-    else {
-      foreach (range(0, 16) as $delta) {
-        variable_set('flickr_block_' . $delta, array(
-          'date' => 'field_flickr_date',
-        ));
-      }
-    }
-  }
-
-  if (module_exists('geofield')) {
-    $field = array(
-      'translatable' => '0',
-      'settings' => array(
-        'backend' => 'default',
-        'srid' => '4326',
-      ),
-      'field_name' => 'field_flickr_geo',
-      'type' => 'geofield',
-      'active' => '1',
-      'locked' => '0',
-      'cardinality' => '1',
-    );
-    field_create_field($field);
-
-    $bundles = field_info_bundles($entity_type = 'node');
-    foreach ($bundles as $bundle => $value) {
-      $instance = array(
-        'field_name' => 'field_flickr_geo',
-        'entity_type' => 'node',
-        'label' => $t('Flickr location'),
-        'bundle' => $bundle,
-        'description' => $t('Grab Flickr photos near this location only.'),
-        'required' => 0,
-        'default_value' => NULL,
-        'widget' => array(
-          'weight' => '6',
-          'type' => 'geofield_latlon',
-          'active' => 1,
-          'settings' => array(
-            'html5_geolocation' => 0,
-          ),
-        ),
-        // Define how the terms will be displayed in full node and teaser mode.
-        'display' => array(
-          'default' => array(
-            'label' => 'above',
-            'type' => 'geofield_description',
-            'weight' => '13',
-            'settings' => array(
-              'data' => 'centroid',
-              'address' => 1,
-            ),
-          ),
-          'teaser' => array(
-            'type' => 'hidden',
-            'label' => 'above',
-            'settings' => array(),
-            'weight' => 0,
-          ),
-        ),
-      );
-      field_create_instance($instance);
-    }
-
-    if (isset($vocabulary) && module_exists('date_popup')) {
-      foreach (range(0, 16) as $delta) {
-        variable_set('flickr_block_' . $delta, array(
-          'vocab' => $vocabulary->vid,
-          'date' => 'field_flickr_date',
-          'geo' => 'field_flickr_geo',
-        ));
-      }
-    }
-    elseif (module_exists('date_popup')) {
-      foreach (range(0, 16) as $delta) {
-        variable_set('flickr_block_' . $delta, array(
-          'date' => 'field_flickr_date',
-          'geo' => 'field_flickr_geo',
-        ));
-      }
-    }
-    else {
-      foreach (range(0, 16) as $delta) {
-        variable_set('flickr_block_' . $delta, array(
-          'geo' => 'field_flickr_geo',
-        ));
-      }
-    }
-  }
-  foreach (range(0, 16) as $delta) {
-    $block_vars = variable_get("flickr_block_{$delta}", array(
-      'user_id' => '',
-      'group_id' => '',
-      'photoset_id' => '',
-      'show_n' => variable_get('flickr_photos_per_page', 6),
-      'size' => variable_get('flickr_default_size_album', 's'),
-      'tag' => '',
-      'tag_mode' => 'context',
-      'extend' => variable_get('flickr_extend', 1),
-      'geo' => '',
-      'date' => '',
-      'media' => 'photos',
-      'vocab' => '',
-      'min_title' => variable_get('flickr_title_suppress_on_small', '100'),
-      'min_metadata' => variable_get('flickr_metadata_suppress_on_small', '150'),
-    ));
-    $block_vars['user_id'] = isset($block_vars['user_id']) ? $block_vars['user_id'] : '';
-    $block_vars['show_n'] = isset($block_vars['show_n']) ? $block_vars['show_n'] : variable_get('flickr_photos_per_page', 6);
-    $block_vars['size'] = isset($block_vars['size']) ? $block_vars['size'] : variable_get('flickr_default_size_album', 's');
-    $block_vars['tag'] = isset($block_vars['tag']) ? $block_vars['tag'] : '';
-    $block_vars['tag_mode'] = isset($block_vars['tag_mode']) ? $block_vars['tag_mode'] : 'context';
-    $block_vars['extend'] = isset($block_vars['extend']) ? $block_vars['extend'] : variable_get('flickr_extend', 1);
-    $block_vars['geo'] = isset($block_vars['geo']) ? $block_vars['geo'] : '';
-    $block_vars['date'] = isset($block_vars['date']) ? $block_vars['date'] : '';
-    if (!isset($block_vars['group_id']) && !isset($block_vars['user_id'])) {
-      $block_vars['group_id'] = '';
-    }
-    else {
-      // In older versions user_id was used to hold the group_id.
-      $block_vars['group_id'] = (!isset($block_vars['group_id']) && isset($block_vars['user_id'])) ? $block_vars['user_id'] : $block_vars['group_id'];
-    }
-    $block_vars['photoset_id'] = isset($block_vars['photoset_id']) ? $block_vars['photoset_id'] : '';
-    $block_vars['sort'] = isset($block_vars['sort']) ? $block_vars['sort'] : 'unsorted';
-    $block_vars['filter'] = isset($block_vars['filter']) ? $block_vars['filter'] : '';
-    $block_vars['media'] = isset($block_vars['media']) ? $block_vars['media'] : 'photos';
-    $block_vars['vocab'] = isset($block_vars['vocab']) ? $block_vars['vocab'] : '';
-    $block_vars['min_title'] = isset($block_vars['min_title']) ? $block_vars['min_title'] : variable_get('flickr_title_suppress_on_small', '100');
-    $block_vars['min_metadata'] = isset($block_vars['min_metadata']) ? $block_vars['min_metadata'] : variable_get('flickr_metadata_suppress_on_small', '150');
-    variable_set('flickr_block_' . $delta, array(
-      'user_id' => $block_vars['user_id'],
-      'show_n' => $block_vars['show_n'],
-      'size' => $block_vars['size'],
-      'tag' => $block_vars['tag'],
-      'tag_mode' => $block_vars['tag_mode'],
-      'extend' => $block_vars['extend'],
-      'geo' => $block_vars['geo'],
-      'date' => $block_vars['date'],
-      'group_id' => $block_vars['group_id'],
-      'photoset_id' => $block_vars['photoset_id'],
-      'sort' => $block_vars['sort'],
-      'filter' => $block_vars['filter'],
-      'media' => $block_vars['media'],
-      'vocab' => $block_vars['vocab'],
-      'min_title' => $block_vars['min_title'],
-      'min_metadata' => $block_vars['min_metadata'],
-    ));
-    unset($block_vars);
-  }
-}
-/**
  * Implements hook_uninstall().
  */
 function flickr_block_uninstall() {
-  variable_del("flickr_block_refresh_random");
-  variable_del("flickr_block_refresh_others");
-  variable_del('flickr_block_heading');
-  variable_del('flickr_block_hide_empty');
-  variable_del('flickr_block_photos_per_set');
-  db_delete('block')
-    ->condition('module', 'flickr')
-    ->execute();
-  db_delete('block_node_type')
-    ->condition('module', 'flickr')
-    ->execute();
-  db_delete('block_role')
-    ->condition('module', 'flickr')
-    ->execute();
-  foreach (range(0, 16) as $delta) {
-    variable_del("flickr_block_{$delta}");
-  }
   if (function_exists('taxonomy_vocabulary_machine_name_load')) {
     $vocabulary = taxonomy_vocabulary_machine_name_load('flickr_tags');
     if ($vocabulary) {
-      field_delete_field('field_' . $vocabulary->machine_name);
-      taxonomy_vocabulary_delete($vocabulary->vid);
+//      field_delete_field('field_' . $vocabulary->machine_name);
+//      taxonomy_vocabulary_delete($vocabulary->vid);
     }
   }
   $field = field_info_field('field_flickr_date');
@@ -661,3 +303,54 @@ function flickr_block_uninstall() {
   }
   field_purge_batch(500);
 }
+
+/**
+ * Implements hook_update_last_removed().
+ */
+function flickr_block_last_removed() {
+  return 7102;
+}
+
+/**
+ * Move flickr settings from variables to config.
+ */
+function flickr_block_update_1000() {
+  // Migrate variables to config.
+  $config = config('flickr_filter.settings');
+  $config->set('flickr_block_refresh_random', update_variable_get('flickr_block_refresh_random', 23));
+  $config->set('flickr_block_refresh_others', update_variable_get('flickr_block_refresh_others', 31));
+  $config->set('flickr_block_heading', update_variable_get('flickr_block_heading', 'h2'));
+  $config->set('flickr_block_hide_empty', update_variable_get('flickr_block_hide_empty', 0));
+  $config->set('flickr_block_photos_per_set', update_variable_get('flickr_block_photos_per_set', 6));
+  foreach (range(0, 16) as $delta) {
+    $config->set('flickr_block_' . $delta, update_variable_get('flickr_block_' . $delta, array(
+      'user_id' => '',
+      'group_id' => '',
+      'photoset_id' => '',
+      'show_n' => config_get('flickr.settings', 'flickr_photos_per_page'),
+      'size' => config_get('flickr.settings', 'flickr_default_size_album'),
+      'tag' => '',
+      'sort' => 'unsorted',
+      'filter' => '',
+      'media' => 'photos',
+      'vocab' => '',
+      'geo' => '',
+      'date' => '',
+      'extend' => config_get('flickr.settings', 'flickr_extend'),
+      'tag_mode' => 'context',
+      'min_title' => config_get('flickr.settings', 'flickr_title_suppress_on_small'),
+      'min_metadata' => config_get('flickr.settings', 'flickr_metadata_suppress_on_small'),
+    )));
+  }
+  $config->save();
+
+  // Delete variables.
+  update_variable_del('flickr_block_refresh_random');
+  update_variable_del('flickr_block_refresh_others');
+  update_variable_del('flickr_block_heading');
+  update_variable_del('flickr_block_hide_empty');
+  update_variable_del('flickr_block_photos_per_set');
+  foreach (range(0, 16) as $delta) {
+    update_variable_del("flickr_block_{$delta}");
+  }
+}
diff --git a/block/flickr_block.module b/block/flickr_block.module
index b78ef7a..ea3702c 100644
--- a/block/flickr_block.module
+++ b/block/flickr_block.module
@@ -8,14 +8,14 @@
   module_load_include('inc', 'flickr_block', 'flickr_block.admin');
 
 /**
- * Implements hook_help().
+ * Implements hook_config_info().
  */
-function flickr_block_help($path, $arg) {
-  switch ($path) {
-    case 'admin/help#flickr_block':
-      // Return a line-break version of the README.txt.
-      return _filter_autop(file_get_contents(dirname(__FILE__) . '/README.txt'));
-  }
+function flickr_block_config_info() {
+  $prefixes['flickr_block.settings'] = array(
+    'label' => t('Flickr Block settings'),
+    'group' => t('Flickr'),
+  );
+  return $prefixes;
 }
 
 /**
@@ -68,29 +68,12 @@ function flickr_block_configure($delta = '') {
   unset($size_options['k']);
   unset($size_options['o']);
   // Define all of the form element variables and retrieve existing values.
-  $settings = variable_get('flickr_block_' . $delta, array(
-    'user_id' => '',
-    'group_id' => '',
-    'photoset_id' => '',
-    'show_n' => variable_get('flickr_photos_per_page', 6),
-    'size' => variable_get('flickr_default_size_album', 's'),
-    'tag' => '',
-    'sort' => 'unsorted',
-    'filter' => '',
-    'media' => 'photos',
-    'vocab' => '',
-    'geo' => '',
-    'date' => '',
-    'extend' => variable_get('flickr_extend', 1),
-    'tag_mode' => 'context',
-    'min_title' => variable_get('flickr_title_suppress_on_small', '100'),
-    'min_metadata' => variable_get('flickr_metadata_suppress_on_small', '150'),
-  ));
+  $settings = config_get('flickr_block.settings', 'flickr_block_' . $delta);
   if (!isset($settings['show_n'])) {
-    $settings['show_n'] = variable_get('flickr_photos_per_page', 6);
+    $settings['show_n'] = config_get('flickr.settings', 'flickr_photos_per_page');
   }
   if (!isset($settings['size'])) {
-    $settings['size'] = variable_get('flickr_default_size_album', 's');
+    $settings['size'] = config_get('flickr.settings', 'flickr_default_size_album');
   }
   if (!isset($settings['tag'])) {
     $settings['tag'] = '';
@@ -120,20 +103,20 @@ function flickr_block_configure($delta = '') {
     $settings['date'] = '';
   }
   if (!isset($settings['extend'])) {
-    $settings['extend'] = variable_get('flickr_extend', 1);
+    $settings['extend'] = config_get('flickr.settings', 'flickr_extend');
   }
   if (!isset($settings['tag_mode'])) {
     $settings['tag_mode'] = 'context';
   }
   if (!isset($settings['min_title'])) {
-    $settings['min_title'] = variable_get('flickr_title_suppress_on_small', '100');
+    $settings['min_title'] = config_get('flickr.settings', 'flickr_title_suppress_on_small');
   }
   if (!isset($settings['min_metadata'])) {
-    $settings['min_metadata'] = variable_get('flickr_metadata_suppress_on_small', '150');
+    $settings['min_metadata'] = config_get('flickr.settings', 'flickr_metadata_suppress_on_small');
   }
   // Define all elements of the block parameters form.
   $form = array();
-  $default_userid = variable_get('flickr_default_userid', '');
+  $default_userid = config_get('flickr.settings', 'flickr_default_userid');
   $user_id = array_key_exists('user_id', $settings) ? $settings['user_id'] : '';
   $default = $user_id;
   if (isset($settings['user_id'])) {
@@ -157,7 +140,7 @@ function flickr_block_configure($delta = '') {
     );
   }
   else {
-    $info = flickr_people_getinfo(variable_get('flickr_default_userid', ''));
+    $info = flickr_people_getinfo(config_get('flickr.settings', 'flickr_default_userid'));
     $form["flickr_block_{$delta}_user_id"] = array(
       '#type' => 'textfield',
       '#title' => t('Flickr User ID'),
@@ -632,12 +615,12 @@ function flickr_block_save($delta = '', $edit = array()) {
   switch ($delta) {
     // User recent Flickr photosets.
     case 1:
-      variable_set('flickr_block_' . $delta, array(
-        'show_n' => (int) $edit["flickr_block_{$delta}_show_n"],
-        'size' => $edit["flickr_block_{$delta}_size"],
-        'media' => $edit["flickr_block_{$delta}_media"],
-        'min_title' => $edit["flickr_block_{$delta}_min_title"],
-        'min_metadata' => $edit["flickr_block_{$delta}_min_metadata"],
+      config_set('flickr_block.settings', 'flickr_block_' . $delta, array(
+        'show_n' => (int) $edit["display_settings"]["flickr_block_{$delta}_show_n"],
+        'size' => $edit["display_settings"]["flickr_block_{$delta}_size"],
+        'media' => $edit["filter_settings"]["flickr_block_{$delta}_media"],
+        'min_title' => $edit["display_settings"]["flickr_block_{$delta}_min_title"],
+        'min_metadata' => $edit["display_settings"]["flickr_block_{$delta}_min_metadata"],
       ));
       cache_clear_all('flickr_block_' . $delta, 'cache', TRUE);
       break;
@@ -645,29 +628,29 @@ function flickr_block_save($delta = '', $edit = array()) {
     // User Flickr photos.
     case 0:
     case 2:
-      $vocab = module_exists('taxonomy') ? (int) $edit["flickr_block_{$delta}_vocab"] : 0;
-      $extend = module_exists('taxonomy') ? $edit["flickr_block_{$delta}_extend"] : 0;
+      $vocab = module_exists('taxonomy') ? (int) $edit["filter_settings"]["flickr_block_{$delta}_vocab"] : 0;
+      $extend = module_exists('taxonomy') ? $edit["filter_settings"]["flickr_block_{$delta}_extend"] : 0;
       if (module_exists('taxonomy')) {
-        $tag_mode = $extend ? 'any' : $edit["flickr_block_{$delta}_tag_mode"];
+        $tag_mode = $extend ? 'any' : $edit["filter_settings"]["flickr_block_{$delta}_tag_mode"];
       }
       else {
         $tag_mode = 'context';
       }
-      $geo = module_exists('geofield') || module_exists('location_node') ? $edit["flickr_block_{$delta}_geo"] : 0;
-      $date = module_exists('date') ? $edit["flickr_block_{$delta}_date"] : 0;
-      variable_set('flickr_block_' . $delta, array(
-        'show_n' => (int) $edit["flickr_block_{$delta}_show_n"],
-        'size' => $edit["flickr_block_{$delta}_size"],
-        'sort' => $edit["flickr_block_{$delta}_sort"],
-        'filter' => $edit["flickr_block_{$delta}_filter"],
-        'media' => $edit["flickr_block_{$delta}_media"],
+      $geo = module_exists('geofield') || module_exists('location_node') ? $edit["filter_settings"]["flickr_block_{$delta}_geo"] : 0;
+      $date = module_exists('date') ? $edit["filter_settings"]["flickr_block_{$delta}_date"] : 0;
+      config_set('flickr_block.settings', 'flickr_block_' . $delta, array(
+        'show_n' => (int) $edit["display_settings"]["flickr_block_{$delta}_show_n"],
+        'size' => $edit["display_settings"]["flickr_block_{$delta}_size"],
+        'sort' => $edit["filter_settings"]["flickr_block_{$delta}_sort"],
+        'filter' => $edit["filter_settings"]["flickr_block_{$delta}_filter"],
+        'media' => $edit["filter_settings"]["flickr_block_{$delta}_media"],
         'vocab' => $vocab,
         'extend' => $extend,
         'tag_mode' => $tag_mode,
         'geo' => $geo,
         'date' => $date,
-        'min_title' => $edit["flickr_block_{$delta}_min_title"],
-        'min_metadata' => $edit["flickr_block_{$delta}_min_metadata"],
+        'min_title' => $edit["display_settings"]["flickr_block_{$delta}_min_title"],
+        'min_metadata' => $edit["display_settings"]["flickr_block_{$delta}_min_metadata"],
       ));
       cache_clear_all('flickr_block_' . $delta, 'cache', TRUE);
       break;
@@ -676,24 +659,24 @@ function flickr_block_save($delta = '', $edit = array()) {
     case 14:
     case 15:
     case 16:
-      $vocab = module_exists('taxonomy') ? (int) $edit["flickr_block_{$delta}_vocab"] : 0;
-      $extend = module_exists('taxonomy') ? $edit["flickr_block_{$delta}_extend"] : 0;
+      $vocab = module_exists('taxonomy') ? (int) $edit["filter_settings"]["flickr_block_{$delta}_vocab"] : 0;
+      $extend = module_exists('taxonomy') ? $edit["filter_settings"]["flickr_block_{$delta}_extend"] : 0;
       if (module_exists('taxonomy')) {
-        $tag_mode = $extend ? 'any' : $edit["flickr_block_{$delta}_tag_mode"];
+        $tag_mode = $extend ? 'any' : $edit["filter_settings"]["flickr_block_{$delta}_tag_mode"];
       }
       else {
         $tag_mode = 'context';
       }
-      variable_set('flickr_block_' . $delta, array(
-        'show_n' => (int) $edit["flickr_block_{$delta}_show_n"],
-        'size' => $edit["flickr_block_{$delta}_size"],
-        'sort' => $edit["flickr_block_{$delta}_sort"],
-        'media' => $edit["flickr_block_{$delta}_media"],
+      config_set('flickr_block.settings', 'flickr_block_' . $delta, array(
+        'show_n' => (int) $edit["display_settings"]["flickr_block_{$delta}_show_n"],
+        'size' => $edit["display_settings"]["flickr_block_{$delta}_size"],
+        'sort' => $edit["filter_settings"]["flickr_block_{$delta}_sort"],
+        'media' => $edit["filter_settings"]["flickr_block_{$delta}_media"],
         'vocab' => $vocab,
         'extend' => $extend,
         'tag_mode' => $tag_mode,
-        'min_title' => $edit["flickr_block_{$delta}_min_title"],
-        'min_metadata' => $edit["flickr_block_{$delta}_min_metadata"],
+        'min_title' => $edit["display_settings"]["flickr_block_{$delta}_min_title"],
+        'min_metadata' => $edit["display_settings"]["flickr_block_{$delta}_min_metadata"],
       ));
       cache_clear_all('flickr_block_' . $delta, 'cache', TRUE);
       break;
@@ -715,32 +698,32 @@ function flickr_block_save($delta = '', $edit = array()) {
 
         }
       }
-      $vocab = module_exists('taxonomy') ? (int) $edit["flickr_block_{$delta}_vocab"] : 0;
-      $extend = module_exists('taxonomy') ? $edit["flickr_block_{$delta}_extend"] : 0;
+      $vocab = module_exists('taxonomy') ? (int) $edit["filter_settings"]["flickr_block_{$delta}_vocab"] : 0;
+      $extend = module_exists('taxonomy') ? $edit["filter_settings"]["flickr_block_{$delta}_extend"] : 0;
       if (module_exists('taxonomy')) {
-        $tag_mode = $extend ? 'any' : $edit["flickr_block_{$delta}_tag_mode"];
+        $tag_mode = $extend ? 'any' : $edit["filter_settings"]["flickr_block_{$delta}_tag_mode"];
       }
       else {
         $tag_mode = 'context';
       }
-      $geo = module_exists('geofield') || module_exists('location_node') ? $edit["flickr_block_{$delta}_geo"] : 0;
-      $date = module_exists('date') ? $edit["flickr_block_{$delta}_date"] : 0;
-      variable_set('flickr_block_' . $delta, array(
+      $geo = module_exists('geofield') || module_exists('location_node') ? $edit["filter_settings"]["flickr_block_{$delta}_geo"] : 0;
+      $date = module_exists('date') ? $edit["filter_settings"]["flickr_block_{$delta}_date"] : 0;
+      config_set('flickr_block.settings', 'flickr_block_' . $delta, array(
         'user_id' => $edit["flickr_block_{$delta}_user_id"],
-        'show_n' => (int) $edit["flickr_block_{$delta}_show_n"],
-        'size' => $edit["flickr_block_{$delta}_size"],
-        'sort' => $edit["flickr_block_{$delta}_sort"],
-        'filter' => $edit["flickr_block_{$delta}_filter"],
-        'media' => $edit["flickr_block_{$delta}_media"],
+        'show_n' => (int) $edit["display_settings"]["flickr_block_{$delta}_show_n"],
+        'size' => $edit["display_settings"]["flickr_block_{$delta}_size"],
+        'sort' => $edit["filter_settings"]["flickr_block_{$delta}_sort"],
+        'filter' => $edit["filter_settings"]["flickr_block_{$delta}_filter"],
+        'media' => $edit["filter_settings"]["flickr_block_{$delta}_media"],
         'vocab' => $vocab,
         'extend' => $extend,
         'tag_mode' => $tag_mode,
         'geo' => $geo,
         'date' => $date,
-        'min_title' => $edit["flickr_block_{$delta}_min_title"],
-        'min_metadata' => $edit["flickr_block_{$delta}_min_metadata"],
+        'min_title' => $edit["display_settings"]["flickr_block_{$delta}_min_title"],
+        'min_metadata' => $edit["display_settings"]["flickr_block_{$delta}_min_metadata"],
       ));
-      $nsid = empty($edit["flickr_block_{$delta}_user_id"]) ? variable_get('flickr_default_userid', '') : $edit["flickr_block_{$delta}_user_id"];
+      $nsid = empty($edit["flickr_block_{$delta}_user_id"]) ? config_get('flickr.settings', 'flickr_default_userid') : $edit["flickr_block_{$delta}_user_id"];
       cache_clear_all('flickr_block_' . $delta, 'cache', TRUE);
       break;
 
@@ -761,27 +744,27 @@ function flickr_block_save($delta = '', $edit = array()) {
 
         }
       }
-      $vocab = module_exists('taxonomy') ? (int) $edit["flickr_block_{$delta}_vocab"] : 0;
-      $extend = module_exists('taxonomy') ? $edit["flickr_block_{$delta}_extend"] : 0;
+      $vocab = module_exists('taxonomy') ? (int) $edit["filter_settings"]["flickr_block_{$delta}_vocab"] : 0;
+      $extend = module_exists('taxonomy') ? $edit["filter_settings"]["flickr_block_{$delta}_extend"] : 0;
       if (module_exists('taxonomy')) {
-        $tag_mode = $extend ? 'any' : $edit["flickr_block_{$delta}_tag_mode"];
+        $tag_mode = $extend ? 'any' : $edit["filter_settings"]["flickr_block_{$delta}_tag_mode"];
       }
       else {
         $tag_mode = 'context';
       }
-      variable_set('flickr_block_' . $delta, array(
+      config_set('flickr_block.settings', 'flickr_block_' . $delta, array(
         'user_id' => $edit["flickr_block_{$delta}_user_id"],
-        'show_n' => (int) $edit["flickr_block_{$delta}_show_n"],
-        'size' => $edit["flickr_block_{$delta}_size"],
-        'sort' => $edit["flickr_block_{$delta}_sort"],
-        'media' => $edit["flickr_block_{$delta}_media"],
+        'show_n' => (int) $edit["display_settings"]["flickr_block_{$delta}_show_n"],
+        'size' => $edit["display_settings"]["flickr_block_{$delta}_size"],
+        'sort' => $edit["filter_settings"]["flickr_block_{$delta}_sort"],
+        'media' => $edit["filter_settings"]["flickr_block_{$delta}_media"],
         'vocab' => $vocab,
         'extend' => $extend,
         'tag_mode' => $tag_mode,
-        'min_title' => $edit["flickr_block_{$delta}_min_title"],
-        'min_metadata' => $edit["flickr_block_{$delta}_min_metadata"],
+        'min_title' => $edit["display_settings"]["flickr_block_{$delta}_min_title"],
+        'min_metadata' => $edit["display_settings"]["flickr_block_{$delta}_min_metadata"],
       ));
-      $nsid = empty($edit["flickr_block_{$delta}_user_id"]) ? variable_get('flickr_default_userid', '') : $edit["flickr_block_{$delta}_user_id"];
+      $nsid = empty($edit["flickr_block_{$delta}_user_id"]) ? config_get('flickr.settings', 'flickr_default_userid') : $edit["flickr_block_{$delta}_user_id"];
       cache_clear_all('flickr_block_' . $delta, 'cache', TRUE);
       break;
 
@@ -801,45 +784,45 @@ function flickr_block_save($delta = '', $edit = array()) {
 
         }
       }
-      variable_set('flickr_block_' . $delta, array(
+      config_set('flickr_block.settings', 'flickr_block_' . $delta, array(
         'user_id' => $edit["flickr_block_{$delta}_user_id"],
-        'show_n' => (int) $edit["flickr_block_{$delta}_show_n"],
-        'size' => $edit["flickr_block_{$delta}_size"],
-        'media' => $edit["flickr_block_{$delta}_media"],
-        'min_title' => $edit["flickr_block_{$delta}_min_title"],
-        'min_metadata' => $edit["flickr_block_{$delta}_min_metadata"],
+        'show_n' => (int) $edit["display_settings"]["flickr_block_{$delta}_show_n"],
+        'size' => $edit["display_settings"]["flickr_block_{$delta}_size"],
+        'media' => $edit["filter_settings"]["flickr_block_{$delta}_media"],
+        'min_title' => $edit["display_settings"]["flickr_block_{$delta}_min_title"],
+        'min_metadata' => $edit["display_settings"]["flickr_block_{$delta}_min_metadata"],
       ));
-      $nsid = empty($edit["flickr_block_{$delta}_user_id"]) ? variable_get('flickr_default_userid', '') : $edit["flickr_block_{$delta}_user_id"];
+      $nsid = empty($edit["flickr_block_{$delta}_user_id"]) ? config_get('flickr.settings', 'flickr_default_userid') : $edit["flickr_block_{$delta}_user_id"];
       cache_clear_all('flickr_block_' . $delta . '_' . $nsid, 'cache', TRUE);
       break;
 
     // Photos from a Flickr group.
     case 6:
     case 10:
-      $vocab = module_exists('taxonomy') ? (int) $edit["flickr_block_{$delta}_vocab"] : 0;
-      $extend = module_exists('taxonomy') ? $edit["flickr_block_{$delta}_extend"] : 0;
+      $vocab = module_exists('taxonomy') ? (int) $edit["filter_settings"]["flickr_block_{$delta}_vocab"] : 0;
+      $extend = module_exists('taxonomy') ? $edit["filter_settings"]["flickr_block_{$delta}_extend"] : 0;
       if (module_exists('taxonomy')) {
-        $tag_mode = $extend ? 'any' : $edit["flickr_block_{$delta}_tag_mode"];
+        $tag_mode = $extend ? 'any' : $edit["filter_settings"]["flickr_block_{$delta}_tag_mode"];
       }
       else {
         $tag_mode = 'context';
       }
-      $geo = module_exists('geofield') || module_exists('location_node') ? $edit["flickr_block_{$delta}_geo"] : 0;
-      $date = module_exists('date') ? $edit["flickr_block_{$delta}_date"] : 0;
-      variable_set('flickr_block_' . $delta, array(
+      $geo = module_exists('geofield') || module_exists('location_node') ? $edit["filter_settings"]["flickr_block_{$delta}_geo"] : 0;
+      $date = module_exists('date') ? $edit["filter_settings"]["flickr_block_{$delta}_date"] : 0;
+      config_set('flickr_block.settings', 'flickr_block_' . $delta, array(
         'group_id' => $edit["flickr_block_{$delta}_group_id"],
-        'show_n' => (int) $edit["flickr_block_{$delta}_show_n"],
-        'size' => $edit["flickr_block_{$delta}_size"],
-        'sort' => $edit["flickr_block_{$delta}_sort"],
-        'filter' => $edit["flickr_block_{$delta}_filter"],
-        'media' => $edit["flickr_block_{$delta}_media"],
+        'show_n' => (int) $edit["display_settings"]["flickr_block_{$delta}_show_n"],
+        'size' => $edit["display_settings"]["flickr_block_{$delta}_size"],
+        'sort' => $edit["filter_settings"]["flickr_block_{$delta}_sort"],
+        'filter' => $edit["filter_settings"]["flickr_block_{$delta}_filter"],
+        'media' => $edit["filter_settings"]["flickr_block_{$delta}_media"],
         'vocab' => $vocab,
         'extend' => $extend,
         'tag_mode' => $tag_mode,
         'geo' => $geo,
         'date' => $date,
-        'min_title' => $edit["flickr_block_{$delta}_min_title"],
-        'min_metadata' => $edit["flickr_block_{$delta}_min_metadata"],
+        'min_title' => $edit["display_settings"]["flickr_block_{$delta}_min_title"],
+        'min_metadata' => $edit["display_settings"]["flickr_block_{$delta}_min_metadata"],
       ));
       cache_clear_all('flickr_block_' . $delta . '_' . $edit["flickr_block_{$delta}_group_id"], 'cache', TRUE);
       break;
@@ -847,35 +830,35 @@ function flickr_block_save($delta = '', $edit = array()) {
     // Photos from a Flickr photoset.
     case 7:
     case 8:
-      $vocab = module_exists('taxonomy') ? (int) $edit["flickr_block_{$delta}_vocab"] : 0;
-      $extend = module_exists('taxonomy') ? $edit["flickr_block_{$delta}_extend"] : 0;
+      $vocab = module_exists('taxonomy') ? (int) $edit["filter_settings"]["flickr_block_{$delta}_vocab"] : 0;
+      $extend = module_exists('taxonomy') ? $edit["filter_settings"]["flickr_block_{$delta}_extend"] : 0;
       if (module_exists('taxonomy')) {
-        $tag_mode = $extend ? 'any' : $edit["flickr_block_{$delta}_tag_mode"];
+        $tag_mode = $extend ? 'any' : $edit["filter_settings"]["flickr_block_{$delta}_tag_mode"];
       }
       else {
         $tag_mode = 'context';
       }
-      variable_set('flickr_block_' . $delta, array(
-        'show_n' => (int) $edit["flickr_block_{$delta}_show_n"],
-        'size' => $edit["flickr_block_{$delta}_size"],
-        'sort' => $edit["flickr_block_{$delta}_sort"],
-        'media' => $edit["flickr_block_{$delta}_media"],
+      config_set('flickr_block.settings', 'flickr_block_' . $delta, array(
+        'show_n' => (int) $edit["display_settings"]["flickr_block_{$delta}_show_n"],
+        'size' => $edit["display_settings"]["flickr_block_{$delta}_size"],
+        'sort' => $edit["filter_settings"]["flickr_block_{$delta}_sort"],
+        'media' => $edit["filter_settings"]["flickr_block_{$delta}_media"],
         'photoset_id' => $edit["flickr_block_{$delta}_photoset"],
         'vocab' => $vocab,
         'extend' => $extend,
         'tag_mode' => $tag_mode,
-        'min_title' => $edit["flickr_block_{$delta}_min_title"],
-        'min_metadata' => $edit["flickr_block_{$delta}_min_metadata"],
+        'min_title' => $edit["display_settings"]["flickr_block_{$delta}_min_title"],
+        'min_metadata' => $edit["display_settings"]["flickr_block_{$delta}_min_metadata"],
       ));
       cache_clear_all('flickr_block_' . $delta . '_' . $edit["flickr_block_{$delta}_photoset"], 'cache', TRUE);
       break;
 
-    // Random photos with a specific tag from a Flickr user.
+    // Photos with a specific tag from a Flickr user.
     case 11:
       $userid = $edit["flickr_block_{$delta}_user_id"];
-      $extend = module_exists('taxonomy') ? $edit["flickr_block_{$delta}_extend"] : 0;
+      $extend = module_exists('taxonomy') ? $edit["filter_settings"]["flickr_block_{$delta}_extend"] : 0;
       if (module_exists('taxonomy')) {
-        $tag_mode = $extend ? 'any' : $edit["flickr_block_{$delta}_tag_mode"];
+        $tag_mode = $extend ? 'any' : $edit["filter_settings"]["flickr_block_{$delta}_tag_mode"];
       }
       if (!empty($userid) && $userid != 'public') {
         if (!flickr_is_nsid($edit["flickr_block_{$delta}_user_id"])) {
@@ -890,21 +873,21 @@ function flickr_block_save($delta = '', $edit = array()) {
 
         }
       }
-      variable_set('flickr_block_' . $delta, array(
+      config_set('flickr_block.settings', 'flickr_block_' . $delta, array(
         'user_id' => $edit["flickr_block_{$delta}_user_id"],
         // Remove whitespace from the tag list.
         'tag' => preg_replace('/\s+/', '', $edit["flickr_block_{$delta}_tag"]),
-        'show_n' => (int) $edit["flickr_block_{$delta}_show_n"],
-        'size' => $edit["flickr_block_{$delta}_size"],
-        'sort' => $edit["flickr_block_{$delta}_sort"],
-        'filter' => $edit["flickr_block_{$delta}_filter"],
-        'media' => $edit["flickr_block_{$delta}_media"],
+        'show_n' => (int) $edit["display_settings"]["flickr_block_{$delta}_show_n"],
+        'size' => $edit["display_settings"]["flickr_block_{$delta}_size"],
+        'sort' => $edit["filter_settings"]["flickr_block_{$delta}_sort"],
+        'filter' => $edit["filter_settings"]["flickr_block_{$delta}_filter"],
+        'media' => $edit["filter_settings"]["flickr_block_{$delta}_media"],
         'extend' => $extend,
         'tag_mode' => $tag_mode,
-        'min_title' => $edit["flickr_block_{$delta}_min_title"],
-        'min_metadata' => $edit["flickr_block_{$delta}_min_metadata"],
+        'min_title' => $edit["display_settings"]["flickr_block_{$delta}_min_title"],
+        'min_metadata' => $edit["display_settings"]["flickr_block_{$delta}_min_metadata"],
       ));
-      $nsid = empty($edit["flickr_block_{$delta}_user_id"]) ? variable_get('flickr_default_userid', '') : $edit["flickr_block_{$delta}_user_id"];
+      $nsid = empty($edit["flickr_block_{$delta}_user_id"]) ? config_get('flickr.settings', 'flickr_default_userid') : $edit["flickr_block_{$delta}_user_id"];
       cache_clear_all('flickr_block_' . $delta, 'cache', TRUE);
       break;
   }
@@ -914,35 +897,18 @@ function flickr_block_save($delta = '', $edit = array()) {
  * Implements hook_block_view().
  */
 function flickr_block_view($delta = '') {
-  $settings = variable_get('flickr_block_' . $delta, array(
-    'user_id' => '',
-    'show_n' => variable_get('flickr_photos_per_page', 6),
-    'size' => variable_get('flickr_default_size_album', 's'),
-    'tag' => '',
-    'group_id' => '',
-    'photoset_id' => '',
-    'sort' => 'unsorted',
-    'filter' => '',
-    'media' => 'photos',
-    'vocab' => '',
-    'geo' => '',
-    'date' => '',
-    'extend' => variable_get('flickr_extend', 1),
-    'tag_mode' => 'context',
-    'min_title' => variable_get('flickr_title_suppress_on_small', '100'),
-    'min_metadata' => variable_get('flickr_metadata_suppress_on_small', '150'),
-  ));
+  $settings = config_get('flickr_block.settings', 'flickr_block_' . $delta);
   if (!isset($settings['tag'])) {
     $settings['tag'] = '';
   }
-  $default_userid = variable_get('flickr_default_userid', '');
+  $default_userid = config_get('flickr.settings', 'flickr_default_userid');
   if (isset($settings['user_id'])) {
     if ($settings['user_id'] == 'public' || ((!isset($settings['user_id']) || empty($settings['user_id'])) && empty($default_userid))) {
       $settings['user_id'] = '39873962@N08';
     }
     elseif (!isset($settings['user_id']) || empty($settings['user_id']))
     // Get the default user id as a fallback.
-      $settings['user_id'] = variable_get('flickr_default_userid', '');
+      $settings['user_id'] = config_get('flickr.settings', 'flickr_default_userid');
     else {
       $settings['user_id'] = flickr_user_find_by_identifier($settings['user_id']);
     }
@@ -963,7 +929,7 @@ function flickr_block_view($delta = '') {
     $settings['vocab'] = '';
   }
   if (!isset($settings['extend'])) {
-    $settings['extend'] = variable_get('flickr_extend', 1);
+    $settings['extend'] = config_get('flickr.settings', 'flickr_extend');
   }
   if (!isset($settings['tag_mode'])) {
     $settings['tag_mode'] = 'context';
@@ -975,10 +941,10 @@ function flickr_block_view($delta = '') {
     $settings['date'] = '';
   }
   if (!isset($settings['min_title'])) {
-    $settings['min_title'] = variable_get('flickr_title_suppress_on_small', '100');
+    $settings['min_title'] = config_get('flickr.settings', 'flickr_title_suppress_on_small');
   }
   if (!isset($settings['min_metadata'])) {
-    $settings['min_metadata'] = variable_get('flickr_metadata_suppress_on_small', '150');
+    $settings['min_metadata'] = config_get('flickr.settings', 'flickr_metadata_suppress_on_small');
   }
   $block = array();
 
@@ -1144,7 +1110,7 @@ function flickr_block_view($delta = '') {
             // Only if on a node page use it's terms.
             $tags = (($nid = (int) arg(1)) && arg(0) == 'node' && ((arg(2) == "" || arg(2) == 'view'))) ? $tags : '';
             $block['subject'] = t("!recent_sets by !username", array('!recent_sets' => $recent_sets, '!username' => $people['name']));
-            $block['content'] = flickr_block_photosets($user->flickr['nsid'], $settings['show_n'], $settings['size'], $settings['media'], $delta, $people, $sort, variable_get('flickr_block_heading', 'h2'), $settings['min_title'], $settings['min_metadata']);
+            $block['content'] = flickr_block_photosets($user->flickr['nsid'], $settings['show_n'], $settings['size'], $settings['media'], $delta, $people, $sort, config_get('flickr_block.settings', 'flickr_block_heading'), $settings['min_title'], $settings['min_metadata']);
             break;
 
           // User Flickr photos.
@@ -1153,7 +1119,7 @@ function flickr_block_view($delta = '') {
             // Only if on a node page use it's terms.
             $tags = (($nid = (int) arg(1)) && arg(0) == 'node' && ((arg(2) == "" || arg(2) == 'view'))) ? $tags : '';
             $block['subject'] = NULL;
-            $block['content'] = flickr_album('user', $user->flickr['nsid'], $settings['show_n'], $settings['size'], $settings['media'], $tags, $tags_user, $delta, $settings['sort'], variable_get('flickr_block_heading', 'h2'), $settings['min_title'], $settings['min_metadata'], $settings['vocab'], $settings['filter'], $lat, $lon, NULL, $datefrom, $dateto, $settings['extend'], $settings['tag_mode']);
+            $block['content'] = flickr_album('user', $user->flickr['nsid'], $settings['show_n'], $settings['size'], $settings['media'], $tags, $tags_user, $delta, $settings['sort'], config_get('flickr_block.settings', 'flickr_block_heading'), $settings['min_title'], $settings['min_metadata'], $settings['vocab'], $settings['filter'], $lat, $lon, NULL, $datefrom, $dateto, $settings['extend'], $settings['tag_mode']);
             break;
 
           // User favorite Flickr photos.
@@ -1162,7 +1128,7 @@ function flickr_block_view($delta = '') {
             // Only if on a node page use it's terms.
             $tags = (($nid = (int) arg(1)) && arg(0) == 'node' && ((arg(2) == "" || arg(2) == 'view'))) ? $tags : '';
             $block['subject'] = NULL;
-            $block['content'] = flickr_album('favorites', $user->flickr['nsid'], $settings['show_n'], $settings['size'], $settings['media'], $tags, '', $delta, $settings['sort'], variable_get('flickr_block_heading', 'h2'), $settings['min_title'], $settings['min_metadata'], $settings['vocab'], NULL, NULL, NULL, NULL, NULL, NULL, $settings['extend']);
+            $block['content'] = flickr_album('favorites', $user->flickr['nsid'], $settings['show_n'], $settings['size'], $settings['media'], $tags, '', $delta, $settings['sort'], config_get('flickr_block.settings', 'flickr_block_heading'), $settings['min_title'], $settings['min_metadata'], $settings['vocab'], NULL, NULL, NULL, NULL, NULL, NULL, $settings['extend']);
             break;
 
           // User gallery Flickr photos.
@@ -1180,7 +1146,7 @@ function flickr_block_view($delta = '') {
             foreach ($galleries as $gallery) {
               foreach ($terms as $term) {
                 if (stripos($gallery['title']['_content'], $term) !== FALSE || (empty($term) && !isset($taxonomy))) {
-                  $block['content'] .= flickr_album('gallery', $gallery['id'], $settings['show_n'], $settings['size'], $settings['media'], $tags, '', $delta, $settings['sort'], variable_get('flickr_block_heading', 'h2'), $settings['min_title'], $settings['min_metadata'], $settings['vocab'], NULL, NULL, NULL, NULL, NULL, NULL, $settings['extend']);
+                  $block['content'] .= flickr_album('gallery', $gallery['id'], $settings['show_n'], $settings['size'], $settings['media'], $tags, '', $delta, $settings['sort'], config_get('flickr_block.settings', 'flickr_block_heading'), $settings['min_title'], $settings['min_metadata'], $settings['vocab'], NULL, NULL, NULL, NULL, NULL, NULL, $settings['extend']);
                 }
               }
             }
@@ -1254,7 +1220,7 @@ function flickr_block_view($delta = '') {
         $dateto = NULL;
       }
       $block['subject'] = NULL;
-      $block['content'] = flickr_album('user', $settings['user_id'], $settings['show_n'], $settings['size'], $settings['media'], $tags, '', $delta, $settings['sort'], variable_get('flickr_block_heading', 'h2'), $settings['min_title'], $settings['min_metadata'], $settings['vocab'], $settings['filter'], $lat, $lon, NULL, $datefrom, $dateto, $settings['extend'], $settings['tag_mode']);
+      $block['content'] = flickr_album('user', $settings['user_id'], $settings['show_n'], $settings['size'], $settings['media'], $tags, '', $delta, $settings['sort'], config_get('flickr_block.settings', 'flickr_block_heading'), $settings['min_title'], $settings['min_metadata'], $settings['vocab'], $settings['filter'], $lat, $lon, NULL, $datefrom, $dateto, $settings['extend'], $settings['tag_mode']);
       break;
 
     // Recent photosets from a Flickr user.
@@ -1269,7 +1235,7 @@ function flickr_block_view($delta = '') {
         ),
       ));
       $block['subject'] = t("!recent_sets by !username", array('!recent_sets' => $recent_sets, '!username' => $people['name']));
-      $block['content'] = flickr_block_photosets($settings['user_id'], $settings['show_n'], $settings['size'], $settings['media'], $delta, $people, $settings['sort'], variable_get('flickr_block_heading', 'h2'), $settings['min_title'], $settings['min_metadata']);
+      $block['content'] = flickr_block_photosets($settings['user_id'], $settings['show_n'], $settings['size'], $settings['media'], $delta, $people, $settings['sort'], config_get('flickr_block.settings', 'flickr_block_heading'), $settings['min_title'], $settings['min_metadata']);
       break;
 
     // Photos from a Flickr group.
@@ -1337,7 +1303,7 @@ function flickr_block_view($delta = '') {
         $dateto = NULL;
       }
       $block['subject'] = NULL;
-      $block['content'] = flickr_album('group', $settings['group_id'], $settings['show_n'], $settings['size'], $settings['media'], $tags, '', $delta, $settings['sort'], variable_get('flickr_block_heading', 'h2'), $settings['min_title'], $settings['min_metadata'], $settings['vocab'], $settings['filter'], $lat, $lon, NULL, $datefrom, $dateto, $settings['extend'], $settings['tag_mode']);
+      $block['content'] = flickr_album('group', $settings['group_id'], $settings['show_n'], $settings['size'], $settings['media'], $tags, '', $delta, $settings['sort'], config_get('flickr_block.settings', 'flickr_block_heading'), $settings['min_title'], $settings['min_metadata'], $settings['vocab'], $settings['filter'], $lat, $lon, NULL, $datefrom, $dateto, $settings['extend'], $settings['tag_mode']);
       break;
 
     // Photos from a Flickr photoset.
@@ -1379,7 +1345,7 @@ function flickr_block_view($delta = '') {
         $tags = '';
       }
       $block['subject'] = NULL;
-      $block['content'] = flickr_album('photoset', $settings['photoset_id'], $settings['show_n'], $settings['size'], $settings['media'], $tags, '', $delta, $settings['sort'], variable_get('flickr_block_heading', 'h2'), $settings['min_title'], $settings['min_metadata'], $settings['vocab'], NULL, NULL, NULL, NULL, NULL, NULL, $settings['extend']);
+      $block['content'] = flickr_album('photoset', $settings['photoset_id'], $settings['show_n'], $settings['size'], $settings['media'], $tags, '', $delta, $settings['sort'], config_get('flickr_block.settings', 'flickr_block_heading'), $settings['min_title'], $settings['min_metadata'], $settings['vocab'], NULL, NULL, NULL, NULL, NULL, NULL, $settings['extend']);
       break;
 
     // Favorite public photos from a Flickr user.
@@ -1422,13 +1388,13 @@ function flickr_block_view($delta = '') {
         $tags = '';
       }
       $block['subject'] = NULL;
-      $block['content'] = flickr_album('favorites', $settings['user_id'], $settings['show_n'], $settings['size'], $settings['media'], $tags, '', $delta, $settings['sort'], variable_get('flickr_block_heading', 'h2'), $settings['min_title'], $settings['min_metadata'], $settings['vocab'], NULL, NULL, NULL, NULL, NULL, NULL, $settings['extend']);
+      $block['content'] = flickr_album('favorites', $settings['user_id'], $settings['show_n'], $settings['size'], $settings['media'], $tags, '', $delta, $settings['sort'], config_get('flickr_block.settings', 'flickr_block_heading'), $settings['min_title'], $settings['min_metadata'], $settings['vocab'], NULL, NULL, NULL, NULL, NULL, NULL, $settings['extend']);
       break;
 
     // Photos with a specific tag from a Flickr user.
     case 11:
       $block['subject'] = NULL;
-      $block['content'] = flickr_album('user', $settings['user_id'], $settings['show_n'], $settings['size'], $settings['media'], $settings['tag'], '', $delta, $settings['sort'], variable_get('flickr_block_heading', 'h2'), $settings['min_title'], $settings['min_metadata'], 0, $settings['filter'], NULL, NULL, NULL, NULL, NULL, $settings['extend'], $settings['tag_mode']);
+      $block['content'] = flickr_album('user', $settings['user_id'], $settings['show_n'], $settings['size'], $settings['media'], $settings['tag'], '', $delta, $settings['sort'], config_get('flickr_block.settings', 'flickr_block_heading'), $settings['min_title'], $settings['min_metadata'], 0, $settings['filter'], NULL, NULL, NULL, NULL, NULL, $settings['extend'], $settings['tag_mode']);
       break;
   }
   return $block;
@@ -1452,7 +1418,7 @@ function flickr_block_photosets($nsid, $show_n, $size, $media, $delta, $people =
           'target' => '_blank',
         ),
       ));
-      $map = variable_get('flickr_maps', 0) ? '(' . l(t('map'), $people['photosurl'] . 'sets/' . $photosets[$i]['id'] . '/map/', array(
+      $map = config_get('flickr.settings', 'flickr_maps') ? '(' . l(t('map'), $people['photosurl'] . 'sets/' . $photosets[$i]['id'] . '/map/', array(
         'attributes' => array(
           'title' => t('View set on Flickr map.'),
           'target' => '_blank',
@@ -1479,7 +1445,7 @@ function flickr_block_photosets($nsid, $show_n, $size, $media, $delta, $people =
             'media' => $media,
             'min_title' => $min_title,
             'min_metadata' => $min_metadata,
-            'per_page' => variable_get('flickr_block_photos_per_set', 6),
+            'per_page' => config_get('flickr_block.settings', 'flickr_block_photos_per_set'),
           ));
           // A counter if set to show.
           $flickr = l(t("set on Flickr"), $people['photosurl'] . 'sets/' . $photosets[$i]['id'] . '/', array(
@@ -1493,7 +1459,7 @@ function flickr_block_photosets($nsid, $show_n, $size, $media, $delta, $people =
             '@total' => number_format($photosets[$i]['photos'], 0, ",", "."),
             '!flickr' => $flickr,
           ));
-          $output .= variable_get('flickr_counter', 1) ? '<div class="flickr-counter">' . $count . '</div>' : '';
+          $output .= config_get('flickr.settings', 'flickr_counter') ? '<div class="flickr-counter">' . $count . '</div>' : '';
       }
       $output .= '</div>';
     }
@@ -1508,7 +1474,7 @@ function flickr_block_photosets($nsid, $show_n, $size, $media, $delta, $people =
       $output .= t('No sets found !flickr.', array('!flickr' => $flickr));
     }
     $output .= '</div>';
-    cache_set('flickr_block_' . $delta . '_' . $nsid, $output, 'cache', time() + (variable_get('flickr_block_refresh_others', 31) * 60 * 60));
+    cache_set('flickr_block_' . $delta . '_' . $nsid, $output, 'cache', time() + (config_get('flickr_block.settings', 'flickr_block_refresh_others') * 60 * 60));
   }
   return $output;
 }
diff --git a/cachewarmer/INSTALL.md b/cachewarmer/INSTALL.md
new file mode 100644
index 0000000..75a2ce6
--- /dev/null
+++ b/cachewarmer/INSTALL.md
@@ -0,0 +1,2 @@
+After install set the 'Minimum cache lifetime' to 'none' at
+admin/config/development/performance.
diff --git a/cachewarmer/INSTALL.txt b/cachewarmer/INSTALL.txt
deleted file mode 100644
index 75a2ce6..0000000
--- a/cachewarmer/INSTALL.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-After install set the 'Minimum cache lifetime' to 'none' at
-admin/config/development/performance.
diff --git a/cachewarmer/README.md b/cachewarmer/README.md
new file mode 100644
index 0000000..fc742d0
--- /dev/null
+++ b/cachewarmer/README.md
@@ -0,0 +1,23 @@
+The content of this file is based on the online documentation that can be found
+at https://www.drupal.org/node/2490126. It is recommended to read it there.
+
+Rebuilds the page cache after cron runs for selected content types also known as
+cache warming. It avoids long page loads for the first visitor after a cron run.
+See https://www.drupal.org/node/1576686/. Feel free to use the method there
+instead of this sub-module. Either way works but don't use them together.
+
+The server virtually visits all nodes of selected content types to ensure the
+cache of these pages is rebuild after a cron run to avoid long page loads for a
+real visitor. It can be limited to selected content types at
+admin/config/media/flickr. The connection method automatically falls back to
+cURL if stream_socket_client fails or is not available. Note that it uses the
+HEAD method where the server MUST NOT return a message-body in the response.
+Drupal will rebuild the full page's cache anyway.
+
+Set the 'Minimum cache lifetime' to 'none' at
+admin/config/development/performance.
+
+It is recommended to set the cron interval to something sensible. By default it
+is set to 3 hours at admin/config/system/cron. For many cases 'once a day' or
+even 'once a week' is more than enough. New or edited content will refresh
+anyway after hitting the 'Save' button.
diff --git a/cachewarmer/README.txt b/cachewarmer/README.txt
deleted file mode 100644
index fc742d0..0000000
--- a/cachewarmer/README.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-The content of this file is based on the online documentation that can be found
-at https://www.drupal.org/node/2490126. It is recommended to read it there.
-
-Rebuilds the page cache after cron runs for selected content types also known as
-cache warming. It avoids long page loads for the first visitor after a cron run.
-See https://www.drupal.org/node/1576686/. Feel free to use the method there
-instead of this sub-module. Either way works but don't use them together.
-
-The server virtually visits all nodes of selected content types to ensure the
-cache of these pages is rebuild after a cron run to avoid long page loads for a
-real visitor. It can be limited to selected content types at
-admin/config/media/flickr. The connection method automatically falls back to
-cURL if stream_socket_client fails or is not available. Note that it uses the
-HEAD method where the server MUST NOT return a message-body in the response.
-Drupal will rebuild the full page's cache anyway.
-
-Set the 'Minimum cache lifetime' to 'none' at
-admin/config/development/performance.
-
-It is recommended to set the cron interval to something sensible. By default it
-is set to 3 hours at admin/config/system/cron. For many cases 'once a day' or
-even 'once a week' is more than enough. New or edited content will refresh
-anyway after hitting the 'Save' button.
diff --git a/cachewarmer/config/flickrcachewarmer.settings.json b/cachewarmer/config/flickrcachewarmer.settings.json
new file mode 100644
index 0000000..4d6835c
--- /dev/null
+++ b/cachewarmer/config/flickrcachewarmer.settings.json
@@ -0,0 +1,6 @@
+{
+  "_config_name": "flickrcachewarmer.settings",
+  "flickrcachewarmer_nodetypes": "[]",
+  "flickrcachewarmer_run": 0,
+  "flickrcachewarmer_batch": ""
+}
diff --git a/cachewarmer/flickrcachewarmer.admin.inc b/cachewarmer/flickrcachewarmer.admin.inc
index 10784d5..e174193 100644
--- a/cachewarmer/flickrcachewarmer.admin.inc
+++ b/cachewarmer/flickrcachewarmer.admin.inc
@@ -10,14 +10,14 @@
 function flickrcachewarmer_form_flickr_admin_settings_alter(&$form, &$form_state) {
   $form['#validate'][] = 'flickrcachewarmer_admin_settings_validate';
   $form['#submit'][] = 'flickrcachewarmer_admin_settings_submit';
-  if (variable_get('cache_lifetime', 0) != 0) {
+  if (config_get('system.core', 'cache_lifetime') != 0) {
     $disable_cachelifetime = l(t("set the 'Minimum cache lifetime' to 'none'"), 'admin/config/development/performance', array(
       'attributes' => array(
         'title' => t('Admin > Configuration > Development > Performance'),
       ),
       'query' => array('destination' => 'admin/config/media/flickr'),
     ));
-    $lifetime = format_interval(variable_get('cache_lifetime', 0), 2);
+    $lifetime = format_interval(config_get('system.core', 'cache_lifetime'), 2);
     $message = t("NOTE: The Flickr Cache Warmer only seems to work well if you !disable_cachelifetime. Currently it is set to %lifetime.", array('!disable_cachelifetime' => $disable_cachelifetime, '%lifetime' => $lifetime));
     drupal_set_message($message, 'warning', FALSE);
   }
@@ -41,11 +41,11 @@ function flickrcachewarmer_form_flickr_admin_settings_alter(&$form, &$form_state
   $form['cachewarmer_settings']['flickrcachewarmer_nodetypes'] = array(
     '#type' => 'checkboxes',
     '#title' => t('Content types to warm'),
-    '#default_value' => variable_get('flickrcachewarmer_nodetypes', array()),
+    '#default_value' => config_get('flickrcachewarmer.settings', 'flickrcachewarmer_nodetypes'),
     '#options' => array_map('check_plain', $names),
     '#description' => t('Enable cache warming for the selected node type(s). Leave empty to select all content types.'),
   );
-  if (variable_get('cache_lifetime', 0) != 0) {
+  if (config_get('system.core', 'cache_lifetime') != 0) {
     $form['cachewarmer_settings']['flickrcachewarmer_nodetypes']['#description'] = t('Enable cache warming for the selected node type(s). Leave empty to select all content types.') . '<br />' . t("NOTE: The Flickr Cache Warmer only seems to work well if you !disable_cachelifetime. Currently it is set to %lifetime.", array('!disable_cachelifetime' => $disable_cachelifetime, '%lifetime' => $lifetime));
   }
   $runcron = l(t("run cron separately"), 'admin/config/system/cron', array(
@@ -54,11 +54,11 @@ function flickrcachewarmer_form_flickr_admin_settings_alter(&$form, &$form_state
     ),
     'query' => array('destination' => 'admin/config/media/flickr'),
   ));
-  variable_set('flickrcachewarmer_run', 0);
+  config_set('flickrcachewarmer.settings', 'flickrcachewarmer_run', 0);
   $form['flickrcachewarmer_run'] = array(
     '#type' => 'checkbox',
     '#title' => t("Rebuild the cache on form submit to enhance performance for all page visits after saving this form."),
-    '#default_value' => variable_get('flickrcachewarmer_run', 0),
+    '#default_value' => config_get('flickrcachewarmer.settings', 'flickrcachewarmer_run'),
     '#description' => t("Note that form submit will very slow. The cache will be rebuilt for the nodes of the selected content types for cache warming.") . '<br />' . t("If you get errors, try to !runcron.", array('!runcron' => $runcron)),
     '#weight' => 98,
   );
@@ -75,7 +75,7 @@ function flickrcachewarmer_admin_settings_validate($form, &$form_state) {
  */
 function flickrcachewarmer_admin_settings_submit($form, &$form_state) {
   if ($form_state['values']['flickrcachewarmer_run']) {
-    $content_types = array_filter(variable_get('flickrcachewarmer_nodetypes', array()));
+    $content_types = array_filter(config_get('flickrcachewarmer.settings', 'flickrcachewarmer_nodetypes'));
     // If no content types are selected in the settings, use all.
     if (empty($content_types)) {
       $names = node_type_get_names();
diff --git a/cachewarmer/flickrcachewarmer.info b/cachewarmer/flickrcachewarmer.info
index 03faa8c..63f4d63 100644
--- a/cachewarmer/flickrcachewarmer.info
+++ b/cachewarmer/flickrcachewarmer.info
@@ -1,6 +1,7 @@
 name = Flickr Cache Warmer
 description = Enhances the performance by rebuilding the page cache after cron runs for selected content types.
-core = 7.x
+type = module
+backdrop = 1.x
 package = Flickr
 configure = admin/config/media/flickr
 dependencies[] = flickr
diff --git a/cachewarmer/flickrcachewarmer.install b/cachewarmer/flickrcachewarmer.install
index 618734e..e7af86f 100644
--- a/cachewarmer/flickrcachewarmer.install
+++ b/cachewarmer/flickrcachewarmer.install
@@ -5,10 +5,18 @@
  */
 
 /**
- * Implements hook_uninstall().
+ * Move flickr settings from variables to config.
  */
-function flickrcachewarmer_uninstall() {
-  variable_del('flickrcachewarmer_nodetypes');
-  variable_del('flickrcachewarmer_run');
-  variable_del('flickrcachewarmer_batch');
+function flickrcachewarmer_update_1000() {
+  // Migrate variables to config.
+  $config = config('flickrcachewarmer.settings');
+  $config->set('flickrcachewarmer_nodetypes', update_variable_get('flickrcachewarmer_nodetypes', array()));
+  $config->set('flickrcachewarmer_run', update_variable_get('flickrcachewarmer_run', 0));
+  $config->set('flickrcachewarmer_batch', update_variable_get('flickrcachewarmer_batch', 0));
+  $config->save();
+
+  // Delete variables.
+  update_variable_del('flickrcachewarmer_nodetypes');
+  update_variable_del('flickrcachewarmer_run');
+  update_variable_del('flickrcachewarmer_batch');
 }
diff --git a/cachewarmer/flickrcachewarmer.module b/cachewarmer/flickrcachewarmer.module
index 3f81887..89b2b23 100644
--- a/cachewarmer/flickrcachewarmer.module
+++ b/cachewarmer/flickrcachewarmer.module
@@ -8,14 +8,14 @@
   module_load_include('inc', 'flickrcachewarmer', 'flickrcachewarmer.admin');
 
 /**
- * Implements hook_help().
+ * Implements hook_config_info().
  */
-function flickrcachewarmer_help($path, $arg) {
-  switch ($path) {
-    case 'admin/help#flickrcachewarmer':
-      // Return a line-break version of the README.txt.
-      return _filter_autop(file_get_contents(dirname(__FILE__) . '/README.txt'));
-  }
+function flickrcachewarmer_config_info() {
+  $prefixes['flickrcachewarmer.settings'] = array(
+    'label' => t('Flickr Cache Warmer settings'),
+    'group' => t('Flickr'),
+  );
+  return $prefixes;
 }
 
 /**
@@ -24,7 +24,7 @@ function flickrcachewarmer_help($path, $arg) {
  * Called every time the Drupal cron runs.
  */
 function flickrcachewarmer_cron() {
-  $content_types = array_filter(variable_get('flickrcachewarmer_nodetypes', array()));
+  $content_types = array_filter(config_get('flickrcachewarmer.settings', 'flickrcachewarmer_nodetypes'));
   // If no content types are selected in the settings, use all.
   if (empty($content_types)) {
     $names = node_type_get_names();
@@ -41,19 +41,19 @@ function flickrcachewarmer_cron() {
   // interval, cut the above array in chunks to batch process them.
   // Note it should currently not be used as we recommend to leave the cache
   // lifetime set to 'none'.
-  $batchnumber = variable_get('cache_lifetime', 0) > (2 * variable_get('cron_safe_threshold', DRUPAL_CRON_DEFAULT_THRESHOLD)) ? ceil(variable_get('cache_lifetime', 0) / variable_get('cron_safe_threshold', DRUPAL_CRON_DEFAULT_THRESHOLD)) : 1;
+  $batchnumber = config_get('system.core', 'cache_lifetime') > (2 * config_get('system.core', 'cron_safe_threshold')) ? ceil(config_get('system.core', 'cache_lifetime') / config_get('system.core', 'cron_safe_threshold')) : 1;
   $batchnumber = $batchnumber > count($nids) ? count($nids) : $batchnumber;
   $batchsize = ceil(count($nids) / $batchnumber);
   $nids = array_chunk($nids, $batchsize, FALSE);
   // If the batch 'ID' is an undefined index (offset), reset it to zero.
-  $batch = variable_get('flickrcachewarmer_batch', 0) > $batchnumber - 1 ? 0 : variable_get('flickrcachewarmer_batch', 0);
+  $batch = config_get('flickrcachewarmer.settings', 'flickrcachewarmer_batch') > $batchnumber - 1 ? 0 : config_get('flickrcachewarmer.settings', 'flickrcachewarmer_batch');
   // Go ahead to warm the cache for a batch of nodes.
   flickrcachewarmer_run($nids[$batch]);
   // Next time we should do the next batch.
-  variable_set('flickrcachewarmer_batch', $batch + 1);
+  config_set('flickrcachewarmer.settings', 'flickrcachewarmer_batch', $batch + 1);
   $nidslist = implode(', ', $nids[$batch]);
   $batchplusone = $batch + 1;
-  $nextcw = format_interval(variable_get('cron_safe_threshold', DRUPAL_CRON_DEFAULT_THRESHOLD), 2);
+  $nextcw = format_interval(config_get('system.core', 'cron_safe_threshold'), 2);
   $ctlist = implode(', ', $content_types);
   $message = t("Cache of nodes successfully rebuilt for the selected content types. Node ID's: %nidslist. This was batch # %batchplusone out of a total of %batchnumber", array(
     '%nidslist' => $nidslist,
@@ -76,7 +76,7 @@ function flickrcachewarmer_cron() {
 function flickrcachewarmer_run($nids) {
   // Visit each node.
   foreach ($nids as $nid) {
-    if ((variable_get('flickr_curl2', 0) || !function_exists('stream_socket_client')) && function_exists('curl_version')) {
+    if ((config_get('flickr.settings', 'flickr_curl2') || !function_exists('stream_socket_client')) && function_exists('curl_version')) {
       $result = flickr_curl_http_request($GLOBALS['base_url'] . '/node/' . $nid, array(
         'method' => 'HEAD',
       ));
@@ -103,7 +103,7 @@ function flickrcachewarmer_run($nids) {
         // Even the cURL method returns an error.
         if ($result->code != 200) {
           // Debug info.
-          if (variable_get('flickr_debug', 0) == 2 && function_exists('dpm')) {
+          if (config_get('flickr.settings', 'flickr_debug') == 2 && function_exists('dpm')) {
             dpm(t("Value of 'result' on nid %nid with error in 'function flickr_request()' with connection method '%cmethod' in 'flickr.inc'", array('%nid' => $nid, '%cmethod' => $cmethod)) . ':');
             dpm($result);
           }
diff --git a/config/flickr.settings.json b/config/flickr.settings.json
new file mode 100644
index 0000000..d2c4e57
--- /dev/null
+++ b/config/flickr.settings.json
@@ -0,0 +1,37 @@
+{
+  "_config_name": "flickr.settings",
+  "flickr_api_key": "",
+  "flickr_api_secret": "",
+  "flickr_cache_duration": 3600,
+  "flickr_cc": 0,
+  "flickr_class": "",
+  "flickr_css": 1,
+  "flickr_curl": 0,
+  "flickr_curl2": 0,
+  "flickr_debug": 0,
+  "flickr_default_size_album": "s",
+  "flickr_default_userid": "",
+  "flickr_opening_size": "",
+  "flickr_per_page": 100,
+  "flickr_photos_per_page": 6,
+  "flickr_rel": "",
+  "flickr_title_suppress_on_small": "100",
+  "flickr_metadata_suppress_on_small": "150",
+  "flickr_license": 1,
+  "flickr_restrict": 1,
+  "flickr_extend": 1,
+  "flickr_counter": 1,
+  "flickr_maps": 0,
+  "flickr_smart": 1,
+  "flickr_date_format_image_title": "medium",
+  "flickr_date_format_image_caption": "interval",
+  "flickr_date_format_image_caption_hover": "long",
+  "flickr_date_format_album_title": "short",
+  "flickr_info_overlay": [
+    "title",
+    "metadata",
+    "description",
+    0
+  ],
+  "flickr_geophp": ["title", 0]
+}
diff --git a/css/flickr.css b/css/flickr.css
new file mode 100644
index 0000000..809bec6
--- /dev/null
+++ b/css/flickr.css
@@ -0,0 +1,106 @@
+.flickr-photo-img {
+  vertical-align: text-bottom;
+}
+
+.flickr-photo-box {
+  float: left;
+  width: 260px;
+  height: 260px;
+  padding: 10px;
+  text-align: center;
+}
+
+.flickr-photoset-img {
+  vertical-align: text-bottom;
+}
+
+.flickr-photoset-box {
+  float: left;
+  padding: 10px;
+  text-align: center;
+}
+
+span.flickr-wrap,
+span.flickr-photoset-single {
+  position: relative;
+  display: inline-block;
+  margin: 0 5px 5px 0;
+  vertical-align: top;
+}
+
+span.flickr-credit {
+  display: block;
+  overflow: hidden;
+  padding: 0 0 4px 4px;
+  font-size: 80%;
+  line-height: 100%;
+}
+
+.flickr-slideshow {
+  position: relative;
+  overflow: hidden;
+  width: 100%;
+  height: 0;
+  /*Change percentage below to change ratio. Currently 16:9 (as most screens).*/
+  padding-bottom: 56.25%;
+}
+
+.flickr-slideshow object {
+  position: absolute;
+  top: 0;
+  left: 0;
+}
+
+.flickr-block-photosets .flickr-block-photoset {
+  margin-top: 0.5em;
+  padding-top: 0.5em;
+  border-top: 1px solid #dfdfdf;
+}
+
+span.floatleft {
+  float: left; /* LTR */
+  margin: 5px 5px 0 0; /* LTR */
+}
+span.floatright {
+  float: right; /* LTR */
+  margin: 5px 0 0 10px; /* LTR */
+}
+
+span.flickr-tags {
+  font-style: italic;
+}
+
+.flickr-wrap,
+.flickr-wrap img,
+.flickr-wrap .flickr-credit {
+  /*See http://stackoverflow.com/a/11390432/523688*/
+  -webkit-box-sizing: border-box;
+     -moz-box-sizing: border-box;
+          box-sizing: border-box;
+  max-width: 100%;
+}
+
+div.flickr-photoset {
+  clear: both;
+}
+
+span.flickr-empty {
+  display: inline-block;
+  margin: 10px;
+}
+
+.page-flickr-sets h1#page-title {
+  display: none;
+}
+
+.tips span.ctools-toggle {
+  float: none !important;
+}
+
+span.grayed-out {
+  color: darkgray;
+}
+
+span.grayed-out-help {
+  color: #666;
+}
diff --git a/css/flickr_cc_icons.css b/css/flickr_cc_icons.css
new file mode 100644
index 0000000..d573771
--- /dev/null
+++ b/css/flickr_cc_icons.css
@@ -0,0 +1,69 @@
+@font-face {
+  font-family: "CC-ICONS";
+  font-weight: normal;
+  font-style: normal;
+  /*See https://css-tricks.com/snippets/css/using-font-face/*/
+
+  src: url("//cdn.jsdelivr.net/cc-icons/1.2.0/fonts/cc-icons.eot?#iefix") format("embedded-opentype"), /* IE6-IE8 */
+  url("//cdn.jsdelivr.net/cc-icons/1.2.0/fonts/cc-icons.woff") format("woff"), /* Modern Browsers */
+  url("//cdn.jsdelivr.net/cc-icons/1.2.0/fonts/cc-icons.ttf") format("truetype"), /* Safari, Android, iOS */
+  url("//cdn.jsdelivr.net/cc-icons/1.2.0/fonts/cc-icons.svg#cc-icons") format("svg"); /* Legacy iOS */
+}
+span.flickr-cc,
+span.flickr-copyright {
+  /*An equivalent to baseline shift to space icons from the line above*/
+  position: relative;
+  top: 0.2em;
+  float: right;
+  margin: 1px 0 6px 0;
+  /*The normal size is not well recognizable*/
+  font-size: large;
+}
+#flickr-admin-settings span.flickr-cc,
+#flickr-admin-settings span.flickr-copyright {
+  float: none;
+  margin-right: 8px;
+}
+span.flickr-cc a,
+span.flickr-copyright a {
+  text-decoration: none;
+}
+span.flickr-cc {
+  /*Creative commons icon font*/
+  font-family: "CC-ICONS";
+}
+/* Necessary to make the copyright symbol most similar to the cc-icons.*/
+span.flickr-copyright {
+  font-family: "lucida grande",tahoma,verdana,arial,sans-serif;
+  font-size: x-large; /*Change to make the size similar to the CC icons.*/
+  font-weight: bold;
+}
+
+.flickr-image span.flickr-cc,
+.flickr-image span.flickr-copyright {
+  position: absolute;
+  top: 4px;
+  left: 7px;
+}
+
+.flickr-image span.flickr-cc a,
+.flickr-image span.flickr-copyright a {
+  letter-spacing: 2px;
+  color: white;
+  text-shadow: -1px -1px 0 black,
+  1px -1px 0 black,
+  -1px 1px 0 black,
+  1px 1px 0 black;
+}
+
+.flickr-image span.flickr-cc {
+  top: 4px;
+  left: 7px;
+  font-size: 100%;
+}
+
+.flickr-image span.flickr-copyright {
+  top: 3px;
+  left: 7px;
+  font-size: large;
+}
diff --git a/css/flickr_cc_icons_on_hover.css b/css/flickr_cc_icons_on_hover.css
new file mode 100644
index 0000000..d3057f1
--- /dev/null
+++ b/css/flickr_cc_icons_on_hover.css
@@ -0,0 +1,12 @@
+.flickr-image span.flickr-cc,
+.flickr-image span.flickr-copyright {
+  display: none;
+}
+
+.flickr-image:hover .flickr-image span.flickr-cc,
+.flickr-wrap:hover .flickr-image span.flickr-cc,
+.flickr-image:hover .flickr-image span.flickr-copyright,
+.flickr-wrap:hover .flickr-image span.flickr-copyright {
+  z-index: 100;
+  display: inline;
+}
diff --git a/field/README.md b/field/README.md
new file mode 100644
index 0000000..abe4153
--- /dev/null
+++ b/field/README.md
@@ -0,0 +1,77 @@
+The content of this file is based on the online documentation that can be found
+at https://drupal.org/node/2171299
+It is recommended to read it there, as it is more detailed and illustrated.
+
+NAME
+====
+Flickr Field
+Part of the Flickr module. Project page at https://drupal.org/project/flickr
+
+OVERVIEW
+========
+Add Flickr images or sets to content as fields:
+- can be added to entities, usually nodes
+- have several formatting options to use various sizes, including slideshows
+- can be queried with the Views module.
+
+There are two kind of module provided Flickr fields. Only the first type is used
+for single Flickr photos. Both type of fields can be used for Flickr Photo Sets
+but each in a different way.
+
+Flickr Photo
+------------
+Store Flickr Photo or Photoset IDs and display the photos in nodes and Views.
+Despite the name this field is used both for individual photos (using
+'Item Type': 'Photo') as for complete sets of photos (using 'Item Type':
+'Photoset'). The submodule Flickr Sets should be enabled to use sets in this
+field.
+
+Flickr Photo Set
+----------------
+Field for storing a reference to a Flickr photo set. It displays only the
+primary representing image of a set or a slideshow of multiple images. To
+display multiple photos from a photoset, use the Flickr Photo field type or use
+the slideshow format.
+
+Most interesting feature of this field is the slideshow. Both a full featured and
+basic version exist. Both are responsive and adapt to the available space.
+
+Full screen mode is supported, showing the largest available image that fits the
+screen on a black background (the way that most professional photographers
+prefer to showcase their work).
+
+FIELD CONFIGURATION
+===================
+- Go to '/admin/structure/types'
+- Click 'manage fields'
+- Add new field > Flickr Photo or Flickr Photo Set (submodule Flickr Sets
+  should be enabled to use sets in this field)
+- Save field settings
+- Configure as desired
+- Save settings
+Then:
+- Go to '/admin/structure/types'
+- Click 'manage display'
+- Select the formatter for a Flickr field (a size)
+- Save
+
+NOTE:
+For square images ('s': 75px and 'q': 150px) no real width needs to be fetched,
+giving it a performance advantage over other sizes. Recommended if you include
+many images.
+
+FEEDS INTEGRATION
+=================
+If you have the feeds module enabled, you can export Flickr field data.
+- Go to 'Mapping' (under 'Processor') for your particular feed.
+- See and use the 3 new 'Target' options (named as your chosen field name with
+  the targeted column (id, nsid and type) in brackets.
+
+The options are as follows:
+- id: This is the Flickr photo or set ID.
+- nsid: This is the Flickr user ID.
+- type: This is the type of Flickr field. Current options are 'photo_id' (for an
+  individual photo) and 'id' (for a set).
+
+Find an example csv file and feeds importer at:
+https://www.drupal.org/node/2339189#comment-9160963
diff --git a/field/README.txt b/field/README.txt
deleted file mode 100644
index abe4153..0000000
--- a/field/README.txt
+++ /dev/null
@@ -1,77 +0,0 @@
-The content of this file is based on the online documentation that can be found
-at https://drupal.org/node/2171299
-It is recommended to read it there, as it is more detailed and illustrated.
-
-NAME
-====
-Flickr Field
-Part of the Flickr module. Project page at https://drupal.org/project/flickr
-
-OVERVIEW
-========
-Add Flickr images or sets to content as fields:
-- can be added to entities, usually nodes
-- have several formatting options to use various sizes, including slideshows
-- can be queried with the Views module.
-
-There are two kind of module provided Flickr fields. Only the first type is used
-for single Flickr photos. Both type of fields can be used for Flickr Photo Sets
-but each in a different way.
-
-Flickr Photo
-------------
-Store Flickr Photo or Photoset IDs and display the photos in nodes and Views.
-Despite the name this field is used both for individual photos (using
-'Item Type': 'Photo') as for complete sets of photos (using 'Item Type':
-'Photoset'). The submodule Flickr Sets should be enabled to use sets in this
-field.
-
-Flickr Photo Set
-----------------
-Field for storing a reference to a Flickr photo set. It displays only the
-primary representing image of a set or a slideshow of multiple images. To
-display multiple photos from a photoset, use the Flickr Photo field type or use
-the slideshow format.
-
-Most interesting feature of this field is the slideshow. Both a full featured and
-basic version exist. Both are responsive and adapt to the available space.
-
-Full screen mode is supported, showing the largest available image that fits the
-screen on a black background (the way that most professional photographers
-prefer to showcase their work).
-
-FIELD CONFIGURATION
-===================
-- Go to '/admin/structure/types'
-- Click 'manage fields'
-- Add new field > Flickr Photo or Flickr Photo Set (submodule Flickr Sets
-  should be enabled to use sets in this field)
-- Save field settings
-- Configure as desired
-- Save settings
-Then:
-- Go to '/admin/structure/types'
-- Click 'manage display'
-- Select the formatter for a Flickr field (a size)
-- Save
-
-NOTE:
-For square images ('s': 75px and 'q': 150px) no real width needs to be fetched,
-giving it a performance advantage over other sizes. Recommended if you include
-many images.
-
-FEEDS INTEGRATION
-=================
-If you have the feeds module enabled, you can export Flickr field data.
-- Go to 'Mapping' (under 'Processor') for your particular feed.
-- See and use the 3 new 'Target' options (named as your chosen field name with
-  the targeted column (id, nsid and type) in brackets.
-
-The options are as follows:
-- id: This is the Flickr photo or set ID.
-- nsid: This is the Flickr user ID.
-- type: This is the type of Flickr field. Current options are 'photo_id' (for an
-  individual photo) and 'id' (for a set).
-
-Find an example csv file and feeds importer at:
-https://www.drupal.org/node/2339189#comment-9160963
diff --git a/field/flickrfield.info b/field/flickrfield.info
index 63cae7f..8a28bac 100644
--- a/field/flickrfield.info
+++ b/field/flickrfield.info
@@ -1,6 +1,7 @@
 name = Flickr Field
 description = Add Flickr images or sets to content as fields.
-core = 7.x
+type = module
+backdrop = 1.x
 package = Flickr
 configure = admin/structure/types
 dependencies[] = flickr
diff --git a/field/flickrfield.module b/field/flickrfield.module
index 26c2862..acf6599 100644
--- a/field/flickrfield.module
+++ b/field/flickrfield.module
@@ -121,10 +121,10 @@ function flickrfield_form_process_flickrfield($element, $form_state, $form = arr
     '#type' => 'textfield',
     '#title' => t('User Id'),
     '#maxlength' => 64,
-    '#default_value' => !empty($element['#value']['nsid']) ? $element['#value']['nsid'] : variable_get('flickr_default_userid', ''),
+    '#default_value' => !empty($element['#value']['nsid']) ? $element['#value']['nsid'] : config_get('flickr.settings', 'flickr_default_userid'),
     '#required' => $element['#required'],
     '#description' => t("The user id of the Flickr user who owns the photos. If this is left blank, the sites's default user will be used. Current default id is @id. !find_id", array(
-      '@id' => variable_get('flickr_default_userid', ''),
+      '@id' => config_get('flickr.settings', 'flickr_default_userid'),
       '!find_id' => $idgettr,
     )),
   );
@@ -327,7 +327,7 @@ function theme_flickrfield_field_formatter($element) {
         'attribs' => NULL,
         'size' => $formatter,
         'photoset' => $photo_data,
-        'per_page' => variable_get('flickr_sets_photos_per_set', 6),
+        'per_page' => config_get('flickr.settings', 'flickr_sets_photos_per_set'),
       ));
   }
 }
diff --git a/filter/README.md b/filter/README.md
new file mode 100644
index 0000000..f615346
--- /dev/null
+++ b/filter/README.md
@@ -0,0 +1,213 @@
+The content of this file is based on the online documentation that can be found
+at https://drupal.org/node/2171503
+It is recommended to read it there, as it is more detailed.
+
+NAME
+====
+Flickr Filter
+Part of the Flickr module. Project page at https://drupal.org/project/flickr
+
+OVERVIEW
+========
+Embed single Flickr images, sets, albums or slideshows (for sets, users or
+groups) in the node body using only the Flickr ID and optionally other
+parameters.
+
+FILTER CONFIGURATION
+====================
+The Flickr filter should be added first to a text format at
+admin/config/content/formats > configure
+In the 'Filter processing order' it should be placed above filters that affect
+image related HTML, for example AutoFloat
+(https://drupal.org/project/autofloat).
+
+Once you enabled the Flickr Filter submodule, you'll find a section FILTER
+OPTIONS on the Flickr configuration page at admin/config/media/flickr to
+provide the default values for the parameters size and heading. Both can be
+overridden by specifying them in the filter tag, like [flickr-
+group:id=91484156@N00, size=q, num=8, tags=flowers, heading=none].
+
+Default size for single photos
+------------------------------
+A default Flickr size to use. This will be used when no size is specified, for
+example [flickr-photo:id=3711935987]. TAKE CARE, the c (800px) size is missing
+on Flickr images uploaded before March 1, 2012. Defaults to m: 240 px on longest side. Thanks to
+the default setting you can change the size of all images without a specified
+size on the site in one go.
+
+Wrap the album title in an HTML heading tag (only for the text filter)
+----------------------------------------------------------------------
+To style the album title. Use 'p' for no style, e.g. 'h3' for a heading or
+'none' to not display an album title.
+
+Checkbox: Collapsible filter tips (collapsed by default)
+--------------------------------------------------------
+Collapse the in-line help for the Flickr Filter text format under the body field
+on node edit forms. This option is only available if the Chaos tool suite
+(ctools) module is enabled. This is almost always the case as this is a
+dependency of the popular Views module.
+
+CREATE NEW FLICKR BLOCKS USING FLICKR FILTER
+============================================
+Using the predefined blocks from the Flickr Block submodule, once you "occupied"
+one with a certain user, group or set ID, it can't be reused. With Flickr Filter
+you just create a new block at admin/structure/block/add, using the right Text
+format. With the parameters you define the desired settings.
+
+If you use a photo size one step bigger than the block width, it will
+automatically limit the image width to that of the block, without leaving
+adjacent white space, filling it completely.
+
+Use the block's visibility settings to specify what pages it should show on.
+Don't use a block title, as this is added already. If you don't want that, use
+the parameter heading=none.
+
+The power of the Flickr Block submodule is that is can be context sensitive by
+filtering Flickr photos on the node author's Flickr account and/or node terms to
+be identical to tags used on Flickr. Something that can not be obtained
+currently with Flickr Filter.
+
+FILTER USAGE
+=============
+Single photo
+============
+
+Filter syntax
+-------------
+The filter format is:
+[flickr-photo:id=7357144724, size=m]
+
+It consists of:
+- An opening square bracket ([).
+- The term flickr followed by a dash (-).
+- The type: photo, photoset, gallery, user, group or favorites followed by a
+  colon (:).
+- A series of parameters separated by commas: id, size, class, style, num, tags,
+  extend, tag_mode, location, date, media, heading, sort, filter, count,
+  mintitle and minmetadata
+- A closing square bracket (]).
+
+Photo ID
+--------
+Use the Flickr Advanced Search at https://www.flickr.com/search/advanced/ to
+find a Flickr photo of your own choice. Click one you like. The last number of
+the URL of the Flickr photo page is the ID, for example '9244503345' in
+https://www.flickr.com/photos/98518260@N02/9244503345/.
+
+Size
+----
+See https://drupal.org/node/2170535#sizes.
+
+TAKE CARE, the c size (800px) is missing on many "older" Flickr
+images!
+
+More info at https://www.flickr.com/services/api/misc.urls.html and
+https://www.flickr.com/help/faq/search/?q=sizes
+
+Float single photos
+-------------------
+If the AutoFloat module is active (https://drupal.org/project/autofloat) the
+text already wraps around the image. If not, go back in 'Edit' mode and add:
+
+, class=floatright
+
+Put it at the end of the text filter tag above but inside the square brackets.
+Don't forget the leading comma. This is prefered as it avoids inline styling and
+is targeted with CSS that can be modified easily.
+
+Also this will work:
+[flickr-photo:id=9247388074, size=m, style=float:right;]
+
+If the AutoFloat module is enabled (recommended), it should precede over the
+existing 'floatleft' and 'floatright' classes found, but not over the inline
+styles. Thus inline styling is the way to override AutoFloat behaviour. The
+margins on the 'text side' of the image from autofloat.css get applied anyway,
+so the text doesn't "lean" against the image.
+
+To pass multiple classes or styles the syntax has to look like:
+[flickr-photo:id=9247386562, class=foo bar, style=float:left; border:solid 2px;]
+Thus without quotes, but with semicolons between styles.
+
+Other parameters
+----------------
+Besides id, size, class and style there are
+other parameters to use, like mintitle and minmetadata. You'll find parameter
+examples, their use and default values at the bottom of the text filter help on
+the 'Edit' page. Try to add some of them to find out how they work.
+
+Album
+=====
+[flickr-photoset:id=72157634563269642]
+
+You can create an album for a:
+
+user
+----
+Most useful in combination with Flickr tags to filter on. User ID 'public' grabs
+all users CC licensed photos.
+
+photoset
+--------
+Currently the only way to have an arbitrary album to show as a slideshow.
+
+gallery
+-------
+The only way to have an arbitrary album with photos from others. Currently no
+slideshow support. Do not put own pictures in a gallery.
+
+group
+-----
+Most convenient way to manage the images by multiple Flickr users, e.g. for a
+sports club website.
+
+user favorite photos
+--------------------
+A gallery is preferred as it give more flexibility. Left for legacy purpose.
+
+All aforementioned parameters that also apply on single images can be used.
+Obviously the 'id' is now a user, set, gallery or group ID. A number that
+includes '@' is a user or group ID. A very long number (>16 characters) is a
+photoset or gallery ID.
+
+Examples:
+- user: '98518260@N02' in https://www.flickr.com/photos/98518260@N02/9244503345
+- photoset: '72157634563269642' in
+  https://www.flickr.com/photos/98518260@N02/sets/72157634563269642
+- gallery: '72157645025390895' in
+  https://www.flickr.com/photos/martinpostma/galleries/72157645025390895
+
+For users and groups you can also use the path alias if it exists:
+- group: 'southseauk' in https://www.flickr.com/groups/southseauk
+
+For albums you have the extra sizes 'x' and 'y' available that result in a full featured
+or basic slideshow over the full content width (responsive). Note that for
+now a slideshow is only supported for photosets, groups and users and any other
+parameters are ignored (NO sort, tags or location). To add some spacing above
+and below a slideshow, modify your CSS or add some lines that contain a non
+breaking space:
+
+&nbsp;
+[flickr-photoset:id=72157634563269642,size=y]
+&nbsp;
+
+
+For all other sizes the following parameters can be used:
+
+- num : The number of photos to show.
+- tags : Flickr tags to filter on.
+- extend : Extends the tag matching to words found in the Flickr photo title or
+  description.
+- tag_mode : Matches 'all' defined tags (AND) or 'any' (OR).
+- location : Grab photos near a certain GPS point. Lat/lon/radius (in km)
+- date : Grab photos taken on a certain date. Also within an interval covering
+  multiple days.
+- location : Lattitude, longitude and optionally radius in km (defaults to 5
+  km).
+- media : photos, videos or all.
+- heading : To suppress the album title.
+- sort : Date taken, posted, number of views, random or unsorted.
+- filter : Interesting or relevant. Only for user albums.
+- count : To suppress how many are available on Flickr.
+
+Again, you'll find parameter examples, their use and default values at the
+bottom of the text filter help on the 'Edit' page.
diff --git a/filter/README.txt b/filter/README.txt
deleted file mode 100644
index f615346..0000000
--- a/filter/README.txt
+++ /dev/null
@@ -1,213 +0,0 @@
-The content of this file is based on the online documentation that can be found
-at https://drupal.org/node/2171503
-It is recommended to read it there, as it is more detailed.
-
-NAME
-====
-Flickr Filter
-Part of the Flickr module. Project page at https://drupal.org/project/flickr
-
-OVERVIEW
-========
-Embed single Flickr images, sets, albums or slideshows (for sets, users or
-groups) in the node body using only the Flickr ID and optionally other
-parameters.
-
-FILTER CONFIGURATION
-====================
-The Flickr filter should be added first to a text format at
-admin/config/content/formats > configure
-In the 'Filter processing order' it should be placed above filters that affect
-image related HTML, for example AutoFloat
-(https://drupal.org/project/autofloat).
-
-Once you enabled the Flickr Filter submodule, you'll find a section FILTER
-OPTIONS on the Flickr configuration page at admin/config/media/flickr to
-provide the default values for the parameters size and heading. Both can be
-overridden by specifying them in the filter tag, like [flickr-
-group:id=91484156@N00, size=q, num=8, tags=flowers, heading=none].
-
-Default size for single photos
-------------------------------
-A default Flickr size to use. This will be used when no size is specified, for
-example [flickr-photo:id=3711935987]. TAKE CARE, the c (800px) size is missing
-on Flickr images uploaded before March 1, 2012. Defaults to m: 240 px on longest side. Thanks to
-the default setting you can change the size of all images without a specified
-size on the site in one go.
-
-Wrap the album title in an HTML heading tag (only for the text filter)
-----------------------------------------------------------------------
-To style the album title. Use 'p' for no style, e.g. 'h3' for a heading or
-'none' to not display an album title.
-
-Checkbox: Collapsible filter tips (collapsed by default)
---------------------------------------------------------
-Collapse the in-line help for the Flickr Filter text format under the body field
-on node edit forms. This option is only available if the Chaos tool suite
-(ctools) module is enabled. This is almost always the case as this is a
-dependency of the popular Views module.
-
-CREATE NEW FLICKR BLOCKS USING FLICKR FILTER
-============================================
-Using the predefined blocks from the Flickr Block submodule, once you "occupied"
-one with a certain user, group or set ID, it can't be reused. With Flickr Filter
-you just create a new block at admin/structure/block/add, using the right Text
-format. With the parameters you define the desired settings.
-
-If you use a photo size one step bigger than the block width, it will
-automatically limit the image width to that of the block, without leaving
-adjacent white space, filling it completely.
-
-Use the block's visibility settings to specify what pages it should show on.
-Don't use a block title, as this is added already. If you don't want that, use
-the parameter heading=none.
-
-The power of the Flickr Block submodule is that is can be context sensitive by
-filtering Flickr photos on the node author's Flickr account and/or node terms to
-be identical to tags used on Flickr. Something that can not be obtained
-currently with Flickr Filter.
-
-FILTER USAGE
-=============
-Single photo
-============
-
-Filter syntax
--------------
-The filter format is:
-[flickr-photo:id=7357144724, size=m]
-
-It consists of:
-- An opening square bracket ([).
-- The term flickr followed by a dash (-).
-- The type: photo, photoset, gallery, user, group or favorites followed by a
-  colon (:).
-- A series of parameters separated by commas: id, size, class, style, num, tags,
-  extend, tag_mode, location, date, media, heading, sort, filter, count,
-  mintitle and minmetadata
-- A closing square bracket (]).
-
-Photo ID
---------
-Use the Flickr Advanced Search at https://www.flickr.com/search/advanced/ to
-find a Flickr photo of your own choice. Click one you like. The last number of
-the URL of the Flickr photo page is the ID, for example '9244503345' in
-https://www.flickr.com/photos/98518260@N02/9244503345/.
-
-Size
-----
-See https://drupal.org/node/2170535#sizes.
-
-TAKE CARE, the c size (800px) is missing on many "older" Flickr
-images!
-
-More info at https://www.flickr.com/services/api/misc.urls.html and
-https://www.flickr.com/help/faq/search/?q=sizes
-
-Float single photos
--------------------
-If the AutoFloat module is active (https://drupal.org/project/autofloat) the
-text already wraps around the image. If not, go back in 'Edit' mode and add:
-
-, class=floatright
-
-Put it at the end of the text filter tag above but inside the square brackets.
-Don't forget the leading comma. This is prefered as it avoids inline styling and
-is targeted with CSS that can be modified easily.
-
-Also this will work:
-[flickr-photo:id=9247388074, size=m, style=float:right;]
-
-If the AutoFloat module is enabled (recommended), it should precede over the
-existing 'floatleft' and 'floatright' classes found, but not over the inline
-styles. Thus inline styling is the way to override AutoFloat behaviour. The
-margins on the 'text side' of the image from autofloat.css get applied anyway,
-so the text doesn't "lean" against the image.
-
-To pass multiple classes or styles the syntax has to look like:
-[flickr-photo:id=9247386562, class=foo bar, style=float:left; border:solid 2px;]
-Thus without quotes, but with semicolons between styles.
-
-Other parameters
-----------------
-Besides id, size, class and style there are
-other parameters to use, like mintitle and minmetadata. You'll find parameter
-examples, their use and default values at the bottom of the text filter help on
-the 'Edit' page. Try to add some of them to find out how they work.
-
-Album
-=====
-[flickr-photoset:id=72157634563269642]
-
-You can create an album for a:
-
-user
-----
-Most useful in combination with Flickr tags to filter on. User ID 'public' grabs
-all users CC licensed photos.
-
-photoset
---------
-Currently the only way to have an arbitrary album to show as a slideshow.
-
-gallery
--------
-The only way to have an arbitrary album with photos from others. Currently no
-slideshow support. Do not put own pictures in a gallery.
-
-group
------
-Most convenient way to manage the images by multiple Flickr users, e.g. for a
-sports club website.
-
-user favorite photos
---------------------
-A gallery is preferred as it give more flexibility. Left for legacy purpose.
-
-All aforementioned parameters that also apply on single images can be used.
-Obviously the 'id' is now a user, set, gallery or group ID. A number that
-includes '@' is a user or group ID. A very long number (>16 characters) is a
-photoset or gallery ID.
-
-Examples:
-- user: '98518260@N02' in https://www.flickr.com/photos/98518260@N02/9244503345
-- photoset: '72157634563269642' in
-  https://www.flickr.com/photos/98518260@N02/sets/72157634563269642
-- gallery: '72157645025390895' in
-  https://www.flickr.com/photos/martinpostma/galleries/72157645025390895
-
-For users and groups you can also use the path alias if it exists:
-- group: 'southseauk' in https://www.flickr.com/groups/southseauk
-
-For albums you have the extra sizes 'x' and 'y' available that result in a full featured
-or basic slideshow over the full content width (responsive). Note that for
-now a slideshow is only supported for photosets, groups and users and any other
-parameters are ignored (NO sort, tags or location). To add some spacing above
-and below a slideshow, modify your CSS or add some lines that contain a non
-breaking space:
-
-&nbsp;
-[flickr-photoset:id=72157634563269642,size=y]
-&nbsp;
-
-
-For all other sizes the following parameters can be used:
-
-- num : The number of photos to show.
-- tags : Flickr tags to filter on.
-- extend : Extends the tag matching to words found in the Flickr photo title or
-  description.
-- tag_mode : Matches 'all' defined tags (AND) or 'any' (OR).
-- location : Grab photos near a certain GPS point. Lat/lon/radius (in km)
-- date : Grab photos taken on a certain date. Also within an interval covering
-  multiple days.
-- location : Lattitude, longitude and optionally radius in km (defaults to 5
-  km).
-- media : photos, videos or all.
-- heading : To suppress the album title.
-- sort : Date taken, posted, number of views, random or unsorted.
-- filter : Interesting or relevant. Only for user albums.
-- count : To suppress how many are available on Flickr.
-
-Again, you'll find parameter examples, their use and default values at the
-bottom of the text filter help on the 'Edit' page.
diff --git a/filter/config/flickr_filter.settings.json b/filter/config/flickr_filter.settings.json
new file mode 100644
index 0000000..23da8db
--- /dev/null
+++ b/filter/config/flickr_filter.settings.json
@@ -0,0 +1,6 @@
+{
+  "_config_name": "flickr_filter.settings",
+  "flickr_filter_heading": "p",
+  "flickr_filter_default_size": "m",
+  "flickr_filter_collapsible": 1
+}
diff --git a/filter/flickr_filter.admin.inc b/filter/flickr_filter.admin.inc
index 511ab04..9d13ed3 100644
--- a/filter/flickr_filter.admin.inc
+++ b/filter/flickr_filter.admin.inc
@@ -20,13 +20,13 @@ function flickr_filter_form_flickr_admin_settings_alter(&$form, &$form_state) {
   $form['filter_settings']['flickr_filter_default_size'] = array(
     '#type' => 'select',
     '#title' => t('Default size for single photos'),
-    '#default_value' => variable_get('flickr_filter_default_size', 'm'),
+    '#default_value' => config_get('flickr_filter.settings', 'flickr_filter_default_size'),
     '#options' => array(
       's' => t('s: 75 px square'),
       't' => t('t: 100 px on longest side'),
       'q' => t('q: 150 px square'),
       'm' => t('m: 240 px on longest side'),
-      'n' => t('n: 320 px on longest side (!)'),
+      'n' => t('n: 320 px on longest side'),
       '-' => t('-: 500 px on longest side'),
       'z' => t('z: 640 px on longest side'),
       'c' => t('c: 800 px on longest side (!)'),
@@ -38,7 +38,7 @@ function flickr_filter_form_flickr_admin_settings_alter(&$form, &$form_state) {
     '#type' => 'textfield',
     '#title' => t('Wrap the album title in an HTML heading tag (only for the text filter)'),
     '#required' => TRUE,
-    '#default_value' => variable_get('flickr_filter_heading', 'p'),
+    '#default_value' => config_get('flickr_filter.settings', 'flickr_filter_heading'),
     '#description' => t("Use 'p' for no style, e.g. 'h3' for a heading or 'none' to not display an album title."),
     '#size' => 4,
     '#maxlength' => 4,
@@ -48,7 +48,7 @@ function flickr_filter_form_flickr_admin_settings_alter(&$form, &$form_state) {
     $form['filter_settings']['flickr_filter_collapsible'] = array(
       '#type' => 'checkbox',
       '#title' => t("Collapsible filter tips (collapsed by default)"),
-      '#default_value' => variable_get('flickr_filter_collapsible', 1),
+      '#default_value' => config_get('flickr_filter.settings', 'flickr_filter_collapsible'),
       '#description' => t('Collapse the in-line help for the Flickr Filter text format under the body field on node edit forms.'),
     );
   }
diff --git a/filter/flickr_filter.info b/filter/flickr_filter.info
index 29cd6ce..b4f36c3 100644
--- a/filter/flickr_filter.info
+++ b/filter/flickr_filter.info
@@ -1,6 +1,7 @@
 name = Flickr Filter
 description = A text filter to insert Flickr photos and sets into content.
-core = 7.x
+type = module
+backdrop = 1.x
 package = Flickr
 configure = admin/config/content/formats
 dependencies[] = flickr
diff --git a/filter/flickr_filter.install b/filter/flickr_filter.install
index 2ec209f..5998974 100644
--- a/filter/flickr_filter.install
+++ b/filter/flickr_filter.install
@@ -1,14 +1,22 @@
 <?php
 /**
  * @file
- * The Flickr Filter uninstall hook
+ * The Flickr Filter update hook
  */
 
 /**
- * Implements hook_uninstall().
+ * Move flickr settings from variables to config.
  */
-function flickr_filter_uninstall() {
-  variable_del('flickr_filter_heading');
-  variable_del('flickr_filter_default_size');
-  variable_del('flickr_filter_collapsible');
+function flickr_filter_update_1000() {
+  // Migrate variables to config.
+  $config = config('flickr_filter.settings');
+  $config->set('flickr_filter_heading', update_variable_get('flickr_filter_heading', 'p'));
+  $config->set('flickr_filter_default_size', update_variable_get('flickr_filter_default_size', 'm'));
+  $config->set('flickr_filter_collapsible', update_variable_get('flickr_filter_collapsible', 1));
+  $config->save();
+
+  // Delete variables.
+  update_variable_del('flickr_filter_heading');
+  update_variable_del('flickr_filter_default_size');
+  update_variable_del('flickr_filter_collapsible');
 }
diff --git a/filter/flickr_filter.module b/filter/flickr_filter.module
index 31b96c2..ff7ba72 100644
--- a/filter/flickr_filter.module
+++ b/filter/flickr_filter.module
@@ -8,14 +8,14 @@
   module_load_include('inc', 'flickr_filter', 'flickr_filter.admin');
 
 /**
- * Implements hook_help().
+ * Implements hook_config_info().
  */
-function flickr_filter_help($path, $arg) {
-  switch ($path) {
-    case 'admin/help#flickr_filter':
-      // Return a line-break version of the README.txt.
-      return _filter_autop(file_get_contents(dirname(__FILE__) . '/README.txt'));
-  }
+function flickr_filter_config_info() {
+  $prefixes['flickr_filter.settings'] = array(
+    'label' => t('Flickr Filter settings'),
+    'group' => t('Flickr'),
+  );
+  return $prefixes;
 }
 
 /**
@@ -65,10 +65,10 @@ function flickr_filter_tips($filter, $format, $long = FALSE) {
       'target' => '_blank',
     ),
   ));
-  $count = variable_get('flickr_counter', 1) ? 'true' : 'false';
-  $extend = variable_get('flickr_extend', 1) ? 'true' : 'false';
-  $default_userid = variable_get('flickr_default_userid', '');
-  $info = empty($default_userid) ? '' : flickr_people_getinfo(variable_get('flickr_default_userid', ''));
+  $count = config_get('flickr.settings', 'flickr_counter') ? 'true' : 'false';
+  $extend = config_get('flickr.settings', 'flickr_extend') ? 'true' : 'false';
+  $default_userid = config_get('flickr.settings', 'flickr_default_userid');
+  $info = empty($default_userid) ? '' : flickr_people_getinfo(config_get('flickr.settings', 'flickr_default_userid'));
   $default_userid = empty($info) ? '[undefined]' : $info['username']['_content'];
   $output = t("Insert a <strong>Flickr photo</strong>. A working example:
   <ul>
@@ -127,13 +127,13 @@ function flickr_filter_tips($filter, $format, $long = FALSE) {
     '!autofloat' => $autofloat,
     '!find_id' => $idgettr,
     '@default_userid' => $default_userid,
-    '@default_size' => variable_get('flickr_filter_default_size', 'm'),
-    '@default_size_album' => variable_get('flickr_default_size_album', 's'),
-    '@default_limit' => variable_get('flickr_per_page', 100),
-    '@default_number' => variable_get('flickr_photos_per_page', 6),
-    '@default_mintitle' => variable_get('flickr_title_suppress_on_small', '100'),
-    '@default_minmetadata' => variable_get('flickr_metadata_suppress_on_small', '150'),
-    '@default_heading' => variable_get('flickr_filter_heading', 'p'),
+    '@default_size' => config_get('flickr_filter.settings', 'flickr_filter_default_size'),
+    '@default_size_album' => config_get('flickr.settings', 'flickr_default_size_album'),
+    '@default_limit' => config_get('flickr.settings', 'flickr_per_page'),
+    '@default_number' => config_get('flickr.settings', 'flickr_photos_per_page'),
+    '@default_mintitle' => config_get('flickr.settings', 'flickr_title_suppress_on_small'),
+    '@default_minmetadata' => config_get('flickr.settings', 'flickr_metadata_suppress_on_small'),
+    '@default_heading' => config_get('flickr_filter.settings', 'flickr_filter_heading'),
     '@default_count' => $count,
     '@default_extend' => $extend,
     '!config' => $config,
@@ -157,7 +157,7 @@ function flickr_filter_tips($filter, $format, $long = FALSE) {
     'handle' => t('Flickr Filter options. !toggle', array('!toggle' => $toggle)),
     'content' => $output, 'collapsed' => TRUE,
   );
-  $output = module_exists('ctools') && variable_get('flickr_filter_collapsible', 1) ? theme('ctools_collapsible', $options) : $output;
+  $output = module_exists('ctools') && config_get('flickr_filter.settings', 'flickr_filter_collapsible') ? theme('ctools_collapsible', $options) : $output;
   return $output;
 }
 
@@ -211,19 +211,19 @@ function flickr_filter_callback_photo($matches) {
   if (isset($config['id'])) {
     if ($photo = flickr_photos_getinfo($config['id'])) {
       if (!isset($config['size'])) {
-        $config['size'] = variable_get('flickr_filter_default_size', 'm');
+        $config['size'] = config_get('flickr_filter.settings', 'flickr_filter_default_size');
       }
       if (!isset($config['mintitle'])) {
-        $config['mintitle'] = variable_get('flickr_title_suppress_on_small', '100');
+        $config['mintitle'] = config_get('flickr.settings', 'flickr_title_suppress_on_small');
       }
       if (!isset($config['minmetadata'])) {
-        $config['minmetadata'] = variable_get('flickr_metadata_suppress_on_small', '150');
+        $config['minmetadata'] = config_get('flickr.settings', 'flickr_metadata_suppress_on_small');
       }
       switch ($config['size']) {
         case "x":
         case "y":
           drupal_set_message(t("Do not use a slideshow for a single image."), 'error');
-          $config['size'] = variable_get('flickr_filter_default_size', 'm');
+          $config['size'] = config_get('flickr_filter.settings', 'flickr_filter_default_size');
           break;
       }
       $sizes = flickr_photo_sizes();
@@ -253,7 +253,7 @@ function flickr_filter_callback_photo($matches) {
 function flickr_filter_callback_album($matches) {
   list($config, $attribs) = flickr_filter_split_config($matches[1]);
   if (!isset($config['id']) || $config['id'] == 'public') {
-    $default_userid = variable_get('flickr_default_userid', '');
+    $default_userid = config_get('flickr.settings', 'flickr_default_userid');
     $config['id'] = !isset($config['id']) ? $default_userid : $config['id'];
     $config['id'] = (!empty($default_userid) && $config['id'] != 'public') ? $default_userid : '39873962@N08';
   }
@@ -273,7 +273,7 @@ function flickr_filter_callback_album($matches) {
     $config['media'] = 'photos';
   }
   if (!isset($config['heading'])) {
-    $config['heading'] = variable_get('flickr_filter_heading', 'p');
+    $config['heading'] = config_get('flickr_filter.settings', 'flickr_filter_heading');
   }
   if (!isset($config['tags'])) {
     $config['tags'] = '';
@@ -303,10 +303,10 @@ function flickr_filter_callback_album($matches) {
     }
   }
   if (!isset($config['count'])) {
-    $config['count'] = variable_get('flickr_counter', 1) ? 'true' : 'false';
+    $config['count'] = config_get('flickr.settings', 'flickr_counter') ? 'true' : 'false';
   }
   if (!isset($config['extend'])) {
-    $config['extend'] = variable_get('flickr_extend', 1);
+    $config['extend'] = config_get('flickr.settings', 'flickr_extend');
   }
   else {
     $config['extend'] = $config['extend'] == 'false' ? 0 : 1;
@@ -376,7 +376,7 @@ function flickr_filter_callback_group($matches) {
       $config['sort'] = 'unsorted';
     }
     if (!isset($config['heading'])) {
-      $config['heading'] = variable_get('flickr_filter_heading', 'p');
+      $config['heading'] = config_get('flickr_filter.settings', 'flickr_filter_heading');
     }
     if (!isset($config['tags'])) {
       $config['tags'] = '';
@@ -385,7 +385,7 @@ function flickr_filter_callback_group($matches) {
       $config['tags'] = str_replace("/", ",", $config['tags']);
     }
     if (!isset($config['count'])) {
-      $config['count'] = variable_get('flickr_counter', 1) ? 'true' : 'false';
+      $config['count'] = config_get('flickr.settings', 'flickr_counter') ? 'true' : 'false';
     }
     if (!isset($config['mintitle'])) {
       $config['mintitle'] = NULL;
@@ -427,7 +427,7 @@ function flickr_filter_callback_group($matches) {
       }
     }
     if (!isset($config['extend'])) {
-      $config['extend'] = variable_get('flickr_extend', 1);
+      $config['extend'] = config_get('flickr.settings', 'flickr_extend');
     }
     else {
       $config['extend'] = $config['extend'] == 'false' ? 0 : 1;
@@ -476,7 +476,7 @@ function flickr_filter_callback_gallery($matches) {
       $config['sort'] = 'unsorted';
     }
     if (!isset($config['heading'])) {
-      $config['heading'] = variable_get('flickr_filter_heading', 'p');
+      $config['heading'] = config_get('flickr_filter.settings', 'flickr_filter_heading');
     }
     if (!isset($config['tags'])) {
       $config['tags'] = '';
@@ -485,7 +485,7 @@ function flickr_filter_callback_gallery($matches) {
       $config['tags'] = str_replace("/", ",", $config['tags']);
     }
     if (!isset($config['count'])) {
-      $config['count'] = variable_get('flickr_counter', 1) ? 'true' : 'false';
+      $config['count'] = config_get('flickr.settings', 'flickr_counter') ? 'true' : 'false';
     }
     if (!isset($config['mintitle'])) {
       $config['mintitle'] = NULL;
@@ -527,7 +527,7 @@ function flickr_filter_callback_gallery($matches) {
       }
     }
     if (!isset($config['extend'])) {
-      $config['extend'] = variable_get('flickr_extend', 1);
+      $config['extend'] = config_get('flickr.settings', 'flickr_extend');
     }
     else {
       $config['extend'] = $config['extend'] == 'false' ? 0 : 1;
@@ -557,7 +557,7 @@ function flickr_filter_callback_favorites($matches) {
   list($config, $attribs) = flickr_filter_split_config($matches[1]);
 
   if (!isset($config['id'])) {
-    $default_userid = variable_get('flickr_default_userid', '');
+    $default_userid = config_get('flickr.settings', 'flickr_default_userid');
     $config['id'] = !empty($default_userid) ? $default_userid : NULL;
   }
   if (isset($config['id'])) {
@@ -580,7 +580,7 @@ function flickr_filter_callback_favorites($matches) {
       $config['sort'] = 'unsorted';
     }
     if (!isset($config['heading'])) {
-      $config['heading'] = variable_get('flickr_filter_heading', 'p');
+      $config['heading'] = config_get('flickr_filter.settings', 'flickr_filter_heading');
     }
     if (!isset($config['tags'])) {
       $config['tags'] = '';
@@ -589,7 +589,7 @@ function flickr_filter_callback_favorites($matches) {
       $config['tags'] = str_replace("/", ",", $config['tags']);
     }
     if (!isset($config['count'])) {
-      $config['count'] = variable_get('flickr_counter', 1) ? 'true' : 'false';
+      $config['count'] = config_get('flickr.settings', 'flickr_counter') ? 'true' : 'false';
     }
     if (!isset($config['mintitle'])) {
       $config['mintitle'] = NULL;
@@ -631,7 +631,7 @@ function flickr_filter_callback_favorites($matches) {
       }
     }
     if (!isset($config['extend'])) {
-      $config['extend'] = variable_get('flickr_extend', 1);
+      $config['extend'] = config_get('flickr.settings', 'flickr_extend');
     }
     else {
       $config['extend'] = $config['extend'] == 'false' ? 0 : 1;
diff --git a/flickr.admin.inc b/flickr.admin.inc
index 9754f69..fc49786 100644
--- a/flickr.admin.inc
+++ b/flickr.admin.inc
@@ -8,7 +8,7 @@
  * Implements hook_settings().
  */
 function flickr_admin_settings() {
-  drupal_add_css(drupal_get_path('module', 'flickr') . '/flickr_cc_icons.css', array(
+  backdrop_add_css(backdrop_get_path('module', 'flickr') . '/css/flickr_cc_icons.css', array(
     'group' => CSS_DEFAULT,
     'every_page' => FALSE,
   ));
@@ -29,17 +29,17 @@ function flickr_admin_settings() {
     '#type' => 'textfield',
     '#title' => t('API Key'),
     '#required' => TRUE,
-    '#default_value' => variable_get('flickr_api_key', ''),
+    '#default_value' => config_get('flickr.settings', 'flickr_api_key'),
     '#description' => t("API Key from Flickr. Get an API Key at !apply.", array('!apply' => $apply)),
   );
   $form['credentials']['flickr_api_secret'] = array(
     '#type' => 'textfield',
     '#title' => t('API Shared Secret'),
     '#required' => TRUE,
-    '#default_value' => variable_get('flickr_api_secret', ''),
+    '#default_value' => config_get('flickr.settings', 'flickr_api_secret'),
     '#description' => t("API key's secret from Flickr."),
   );
-  $default = variable_get('flickr_default_userid', '');
+  $default = config_get('flickr.settings', 'flickr_default_userid');
   if (!empty($default)) {
     $info = flickr_people_getinfo($default);
     $default = $info['username']['_content'];
@@ -66,7 +66,7 @@ function flickr_admin_settings() {
     '#type' => 'textfield',
     '#title' => t('Number of photos per album'),
     '#required' => TRUE,
-    '#default_value' => variable_get('flickr_photos_per_page', 6),
+    '#default_value' => config_get('flickr.settings', 'flickr_photos_per_page'),
     '#description' => t('How many photos of a photoset display in your nodes if no number is specified. Clear the cache on form submit.'),
     '#size' => 3,
     '#maxlength' => 3,
@@ -74,13 +74,13 @@ function flickr_admin_settings() {
   $form['info_settings']['flickr_default_size_album'] = array(
     '#type' => 'select',
     '#title' => t('Default size for photos in an album'),
-    '#default_value' => variable_get('flickr_default_size_album', 's'),
+    '#default_value' => config_get('flickr.settings', 'flickr_default_size_album'),
     '#options' => array(
       's' => t('s: 75 px square'),
       't' => t('t: 100 px on longest side'),
       'q' => t('q: 150 px square'),
       'm' => t('m: 240 px on longest side'),
-      'n' => t('n: 320 px on longest side (!)'),
+      'n' => t('n: 320 px on longest side'),
       '-' => t('-: 500 px on longest side'),
       'z' => t('z: 640 px on longest side'),
       'c' => t('c: 800 px on longest side (!)'),
@@ -104,7 +104,7 @@ function flickr_admin_settings() {
     '#type' => 'textfield',
     '#title' => t('Minimum image width to display a title caption'),
     '#required' => TRUE,
-    '#default_value' => variable_get('flickr_title_suppress_on_small', '100'),
+    '#default_value' => config_get('flickr.settings', 'flickr_title_suppress_on_small'),
     '#description' => t("Small images have liitle space for a title caption. Replace it with the text 'Flickr' that links to the photo page on Flickr to comply with their !guidelines.<br />Set it to '0 px' to always include or '999 px' to always exclude. To give !attribution this should be included (space allowing). Clear the cache on form submit.", array('!attribution' => $attribution, '!guidelines' => $guidelines)),
     '#field_suffix' => t('px'),
     '#size' => 3,
@@ -114,7 +114,7 @@ function flickr_admin_settings() {
     '#type' => 'textfield',
     '#title' => t('Minimum image width to display date, location, photographer and optionally license info under the caption'),
     '#required' => TRUE,
-    '#default_value' => variable_get('flickr_metadata_suppress_on_small', '150'),
+    '#default_value' => config_get('flickr.settings', 'flickr_metadata_suppress_on_small'),
     '#description' => t("Suppress extra info on small images. Set it to '0 px' to always include or '999 px' to always exclude. To give !attribution this should be included (space allowing). Clear the cache on form submit.", array('!attribution' => $attribution)),
     '#field_suffix' => t('px'),
     '#size' => 3,
@@ -154,7 +154,7 @@ function flickr_admin_settings() {
       t("On the image (small in the top left corner, always)"),
       t("In the caption"),
     ),
-    '#default_value' => variable_get('flickr_license', 1),
+    '#default_value' => config_get('flickr.settings', 'flickr_license'),
     '#description' => t("To give !attribution. Clear the cache on form submit.<br />!cc_icons in 'flickr_cc_icons.css'. Download it if you prefer to host it yourself locally (CC 4.0 licensed, give credit somewhere). Adjust 'flickr_cc_icons.css' accordingly.<br />Some examples (try to mouse-over): !ccexample_cna !cc_example_copy !cc_example_p", array(
         '!attribution' => $attribution,
         '!cc_icons' => $cc_icons,
@@ -171,34 +171,31 @@ function flickr_admin_settings() {
       t("Do not restrict media to Creative Commons licensed on 'public' queries if no results are returned."),
       t("Do not restrict media to Creative Commons licensed on 'public' queries."),
     ),
-    '#default_value' => variable_get('flickr_restrict', 1),
+    '#default_value' => config_get('flickr.settings', 'flickr_restrict'),
     '#description' => t("With 'public' queries are intended Flickr requests that do not specify a Flickr user or group ID, thus returning results from all public Flickr photos."),
   );
   $form['info_settings']['flickr_extend'] = array(
     '#type' => 'checkbox',
     '#title' => t("Extend the tag filter to search for matching terms also in the Flickr photo title and description besides Flickr tags. Descriptions are only searched on the album type 'user' (also 'public')."),
-    '#default_value' => variable_get('flickr_extend', 1),
+    '#default_value' => config_get('flickr.settings', 'flickr_extend'),
     '#description' => t("Shows more results. Can be overridden individually by the filter tag, eg. [flickr-user:id=public, size=q, tags=Augusto Canario, extend=true] or in the specific configuration of a Flickr block."),
   );
   $form['info_settings']['flickr_maps'] = array(
     '#type' => 'checkbox',
     '#title' => t('Extra links to Flickr maps'),
-    '#default_value' => variable_get('flickr_maps', 0),
+    '#default_value' => config_get('flickr.settings', 'flickr_maps'),
     '#description' => t('Include extra links to maps available for a user, group or set on Flickr. Locations mentioned (if displayed) under individual images link to corresponding Flickr user maps in any case, independent of the setting here.'),
   );
   $form['info_settings']['flickr_counter'] = array(
     '#type' => 'checkbox',
     '#title' => t('Show a Flickr counter'),
-    '#default_value' => variable_get('flickr_counter', 1),
+    '#default_value' => config_get('flickr.settings', 'flickr_counter'),
     '#description' => t('Shows how many photos are displayed out of the total number available for a user, group, set or tags on Flickr. Can be overridden individually by the filter tag, eg. [flickr-photoset:id=72157634563269642,count=false]'),
   );
   $form['info_settings']['flickr_geophp'] = array(
     '#type' => 'checkboxes',
     '#title' => t('Use Google instead of Flickr for location info (reverse geocoding)'),
-    '#default_value' => variable_get('flickr_geophp', array(
-      'title' => 'title',
-      'caption' => 0,
-    )),
+    '#default_value' => config_get('flickr.settings', 'flickr_geophp'),
     '#options' => array(
       'title' => t('In the album title'),
       'caption' => t('In the photo caption'),
@@ -212,22 +209,22 @@ function flickr_admin_settings() {
     '#weight' => 6,
   );
   // Get list of all available date formats.
-  drupal_static_reset('system_get_date_types');
+  backdrop_static_reset('system_get_date_types');
   $formats = array();
   foreach (system_get_date_types() as $f => $format) {
     if (($format_string = variable_get('date_format_' . $f, FALSE)) === FALSE) {
       $format_string = key(system_get_date_formats($f));
     }
 
-    if (!empty($format_string)) {
-      $formats[$f] = $format['title'] . ' [' . format_date(REQUEST_TIME, 'custom', $format_string) . ']';
+    if (!empty($format_string) && !(stripos($f, 'html') !== FALSE)) {
+      $formats[$f] = $format['label'];
     }
   }
   $formats['interval'] = 'Time ago [' . format_interval(3600 * 24 * 90, 1) . ' ago]';
   $form['date_formats_settings']['flickr_date_format_image_title'] = array(
     '#type' => 'select',
     '#title' => t('When hovering an image (mouse-over)'),
-    '#default_value' => variable_get('flickr_date_format_image_title', 'medium'),
+    '#default_value' => config_get('flickr.settings', 'flickr_date_format_image_title'),
     '#options' => $formats,
     '#empty_option' => t('- None -'),
     '#empty_value' => 'none',
@@ -235,7 +232,7 @@ function flickr_admin_settings() {
   $form['date_formats_settings']['flickr_date_format_image_caption'] = array(
     '#type' => 'select',
     '#title' => t('In the image caption'),
-    '#default_value' => variable_get('flickr_date_format_image_caption', 'interval'),
+    '#default_value' => config_get('flickr.settings', 'flickr_date_format_image_caption'),
     '#options' => $formats,
     '#empty_option' => t('- None -'),
     '#empty_value' => 'none',
@@ -244,13 +241,13 @@ function flickr_admin_settings() {
     '#type' => 'select',
     '#title' => t('When hovering a date in the caption'),
     '#description' => t("If you don't want to display anything when hovering the date, select 'None'."),
-    '#default_value' => variable_get('flickr_date_format_image_caption_hover', 'long'),
+    '#default_value' => config_get('flickr.settings', 'flickr_date_format_image_caption_hover'),
     '#options' => $formats,
     '#empty_option' => t('- None -'),
     '#empty_value' => 'none',
   );
   // Disable the caption hover option if a date in the caption is set to 'none'.
-  if (variable_get('flickr_date_format_image_caption', 'interval') == 'none') {
+  if (config_get('flickr.settings', 'flickr_date_format_image_caption') == 'none') {
     $form['date_formats_settings']['flickr_date_format_image_caption_hover']['#disabled'] = TRUE;
     $form['date_formats_settings']['flickr_date_format_image_caption_hover']['#title'] = '<span class="grayed-out">' . t('When hovering a date in the caption') . '</span>';
     $form['date_formats_settings']['flickr_date_format_image_caption_hover']['#description'] = t('Disabled until a date format for the image caption is selected.');
@@ -259,14 +256,14 @@ function flickr_admin_settings() {
     '#type' => 'select',
     '#title' => t('In the album title'),
     '#description' => t("If the selected date format contains a time, only the date part of it will be used in the album title."),
-    '#default_value' => variable_get('flickr_date_format_album_title', 'short'),
+    '#default_value' => config_get('flickr.settings', 'flickr_date_format_album_title'),
     '#options' => $formats,
     '#empty_option' => t('- None -'),
     '#empty_value' => 'none',
   );
-  $colorbox_module = l(t('Colorbox module'), 'https://drupal.org/project/colorbox', array(
+  $colorbox_module = l(t('Colorbox module'), 'https://github.com/backdrop-contrib/colorbox', array(
       'attributes' => array(
-        'title' => t('Colorbox| Drupal.org'),
+        'title' => t('backdrop-contrib/colorbox | GitHub'),
         'target' => '_blank',
       ),
   ));
@@ -281,23 +278,23 @@ function flickr_admin_settings() {
   $form['overlay_settings']['flickr_class'] = array(
     '#type' => 'textfield',
     '#title' => t('class'),
-    '#default_value' => variable_get('flickr_class', ''),
+    '#default_value' => config_get('flickr.settings', 'flickr_class'),
     '#description' => t('For example: <em>colorbox</em>. Can be left empty for Lightbox. Clear the cache on form submit.'),
   );
   $form['overlay_settings']['flickr_rel'] = array(
     '#type' => 'textfield',
     '#title' => t('rel'),
-    '#default_value' => variable_get('flickr_rel', ''),
+    '#default_value' => config_get('flickr.settings', 'flickr_rel'),
     '#description' => t('For example: <em>gallery-all</em> for Colorbox or <em>lightbox[gallery]</em>. Clear the cache on form submit.'),
   );
   $form['overlay_settings']['flickr_opening_size'] = array(
     '#type' => 'select',
     '#title' => t('Image size to open'),
-    '#default_value' => variable_get('flickr_opening_size', ''),
+    '#default_value' => config_get('flickr.settings', 'flickr_opening_size'),
     '#options' => array(
       'q' => t('q: 150 px square'),
       'm' => t('m: 240 px on longest side'),
-      'n' => t('n: 320 px on longest side (!)'),
+      'n' => t('n: 320 px on longest side'),
       '' => t('-: 500 px on longest side'),
       'z' => t('z: 640 px on longest side'),
       'c' => t('c: 800 px on longest side (!)'),
@@ -309,12 +306,7 @@ function flickr_admin_settings() {
   $form['overlay_settings']['flickr_info_overlay'] = array(
     '#type' => 'checkboxes',
     '#title' => t('Info to include when enlarging the image'),
-    '#default_value' => variable_get('flickr_info_overlay', array(
-      'title' => 'title',
-      'metadata' => 'metadata',
-      'description' => 'description',
-      'license' => 0,
-    )),
+    '#default_value' => config_get('flickr.settings', 'flickr_info_overlay'),
     '#description' => t("To give !attribution all marked * should be checked. Clear the cache on form submit.", array('!attribution' => $attribution)),
     '#options' => array(
       'title' => t('Title *'),
@@ -330,16 +322,16 @@ function flickr_admin_settings() {
     '#collapsed' => TRUE,
     '#weight' => 10,
   );
-  $autofloat_module = l(t('AutoFloat module'), 'https://drupal.org/project/autofloat', array(
+  $autofloat_module = l(t('AutoFloat module'), 'https://github.com/backdrop-contrib/autofloat', array(
       'attributes' => array(
-        'title' => t('AutoFloat | Drupal.org'),
+        'title' => t('backdrop-contrib/autofloat | GitHub'),
         'target' => '_blank',
       ),
   ));
   $form['css_settings']['flickr_css'] = array(
     '#type' => 'checkbox',
     '#title' => t('Use flickr.css'),
-    '#default_value' => variable_get('flickr_css', 1),
+    '#default_value' => config_get('flickr.settings', 'flickr_css'),
     '#description' => t("Uncheck to take care of the styling yourself in custom CSS.<br />If you use Flickr Filter, you might find the !autofloat_module useful.", array('!autofloat_module' => $autofloat_module)),
   );
   $flickr_style = l(t('Flickr Style'), 'admin/modules', array(
@@ -377,7 +369,7 @@ function flickr_admin_settings() {
     '#type' => 'select',
     '#title' => t('Update interval'),
     '#options' => $ageoptions,
-    '#default_value' => variable_get('flickr_cache_duration', 3600),
+    '#default_value' => config_get('flickr.settings', 'flickr_cache_duration'),
     '#description' => t('The refresh interval indicating how often you want to check cached Flickr API calls are up to date.'),
   );
   $cache_warming = l(t('cache warming'), 'https://drupal.org/node/1576686', array(
@@ -390,7 +382,7 @@ function flickr_admin_settings() {
     '#type' => 'textfield',
     '#title' => t('Limit the number of photos to grab for random and popularity sort'),
     '#required' => TRUE,
-    '#default_value' => variable_get('flickr_per_page', 100),
+    '#default_value' => config_get('flickr.settings', 'flickr_per_page'),
     '#description' => t('Setting a lower number enhances performance but makes random results being less spread between one another (not less random) and returns popular (most viewed on Flickr) only from the <em>n</em> most recent.<br />Minimum 20, maximum 500. Set the maximum only if you use !cache_warming.', array('!cache_warming' => $cache_warming)),
     '#size' => 3,
     '#maxlength' => 3,
@@ -404,13 +396,13 @@ function flickr_admin_settings() {
   $form['advanced_settings']['flickr_curl'] = array(
     '#type' => 'checkbox',
     '#title' => t("Use 'cURL' to determine the image width instead of 'fopen' used by the PHP function 'getimagesize'."),
-    '#default_value' => variable_get('flickr_curl', 0),
+    '#default_value' => config_get('flickr.settings', 'flickr_curl'),
     '#description' => t("Your server configuration now uses 'fopen' for external resources (used by 'getimagesize'). 'cURL' might be faster. !more_info.", array('!more_info' => $more_info)),
   );
   $form['advanced_settings']['flickr_curl2'] = array(
     '#type' => 'checkbox',
     '#title' => t("Use 'cURL' instead of 'stream_socket_client' (drupal_http_request) to make data requests."),
-    '#default_value' => variable_get('flickr_curl2', 0),
+    '#default_value' => config_get('flickr.settings', 'flickr_curl2'),
     '#description' => t("Otherwise cURL will only be used as fallback when drupal_http_request fails."),
   );
   // Offer the following setting if both allow_url_fopen and curl are enabled.
@@ -431,16 +423,16 @@ function flickr_admin_settings() {
     $form['advanced_settings']['flickr_curl2']['#disabled'] = TRUE;
     $form['advanced_settings']['flickr_curl2']['#description'] = t("Disabled because your server configuration only allows 'stream_socket_client' (not 'cURL')");
   }
-  $devel_module = l(t('Devel module'), 'https://drupal.org/project/devel', array(
+  $devel_module = l(t('Devel module'), 'https://github.com/backdrop-contrib/devel', array(
       'attributes' => array(
-        'title' => t('Devel | Drupal.org'),
+        'title' => t('backdrop-contrib/devel | GitHub'),
         'target' => '_blank',
       ),
   ));
   // Disable the Devel output until it is available.
   if (!module_exists('devel')) {
-    if (variable_get('flickr_debug', 0) == 2) {
-      variable_set('flickr_debug', 1);
+    if (config_get('flickr.settings', 'flickr_debug') == 2) {
+      config_set('flickr.settings', 'flickr_debug', 1);
       drupal_set_message(t("The debug output has been set to 'Flickr response only'. 'Plus Devel' has been disabled until you enable the !devel_module.", array('!devel_module' => $devel_module)), 'warning', FALSE);
     }
   }
@@ -453,7 +445,7 @@ function flickr_admin_settings() {
       t('Plus Devel (Flickr response plus additional output)'),
     ),
     '#description' => t('Display the Flickr XML response, all passed photo/album arguments and HTTP requests/response objects via the !devel_module.', array('!devel_module' => $devel_module)),
-    '#default_value' => variable_get('flickr_debug', 0),
+    '#default_value' => config_get('flickr.settings', 'flickr_debug'),
   );
   // Disable the Devel output until it is available.
   if (!module_exists('devel')) {
@@ -475,22 +467,22 @@ function flickr_admin_settings() {
   if (module_exists('flickr_block')) {
     $form['block_settings']['#description'] = t('Clear the cache on form submit.');
   }
-  $date = l(t('Date'), 'https://www.drupal.org/project/date', array(
+  $date = l(t('Date'), 'https://github.com/backdrop-contrib/date', array(
     'attributes' => array(
-      'title' => t('Project page on Drupal.org'),
+      'title' => t('backdrop-contrib/date | GitHub'),
       'target' => '_blank',
     ),
   ));
-  $geofield = l(t('Geofield'), 'https://www.drupal.org/project/geofield', array(
+  $geofield = l(t('Geofield'), 'https://github.com/backdrop-contrib/geofield', array(
     'attributes' => array(
-      'title' => t('Project page on Drupal.org'),
+      'title' => t('backdrop-contrib/geofield | GitHub'),
       'target' => '_blank',
     ),
   ));
   $form['block_settings']['flickr_smart'] = array(
     '#type' => 'checkbox',
     '#title' => t("Smart install of Flickr Block"),
-    '#default_value' => variable_get('flickr_smart', 1),
+    '#default_value' => config_get('flickr.settings', 'flickr_smart'),
     '#description' => t("On install of Flickr Block auto create Flickr taxonomy, date and geo fields on all node types to grab Flickr photos related to the node on the same page as a Flickr block based on tags, a date or a location. Enable Taxonomy (core), !date (including date_popup) and !geofield before enabling Flickr Block for the first time (or uninstall it first).", array('!date' => $date, '!geofield' => $geofield)),
   );
   // If a block variable exists, the Flickr Block module has not been
@@ -514,15 +506,22 @@ function flickr_admin_settings() {
   $form['flickr_cc'] = array(
     '#type' => 'checkbox',
     '#title' => t("Flush the cache on form submit to see your changes instantly."),
-    '#default_value' => variable_get('flickr_cc', 0),
+    '#default_value' => config_get('flickr.settings', 'flickr_cc'),
     '#description' => t("Note that form submit will be slower. Your content will be rebuilt at the first visit. Your choice will be 'remembered' for your next visit to this configuration page."),
     '#weight' => 97,
   );
 
-  // Call submit_function() on form submission.
+  $form['#validate'][] = 'flickr_admin_settings_validate';
   $form['#submit'][] = 'flickr_admin_settings_submit';
 
-  return system_settings_form($form);
+  // Add a submit button
+  $form['actions']['#type'] = 'actions';
+  $form['actions']['submit'] = array(
+    '#type' => 'submit',
+    '#value' => t('Save configuration'),
+  );
+
+  return $form;
 }
 
 /**
@@ -584,10 +583,7 @@ function flickr_admin_settings_submit($form, &$form_state) {
   // As emails or usernames might change, replace them with a unique nsid.
   if (!flickr_is_nsid($form_state['values']['flickr_default_userid'])) {
     $userid = $form_state['values']['flickr_default_userid'];
-    if (empty($userid)) {
-      return;
-    }
-    if ($user = flickr_user_find_by_identifier($userid)) {
+    if (!empty($userid) && $user = flickr_user_find_by_identifier($userid)) {
       drupal_set_message(t("The Flickr user associated with '%userid' has internally been replaced with the corresponding Flickr ID '%uid'.", array('%userid' => $form_state['values']['flickr_default_userid'], '%uid' => $user)));
       $form_state['values']['flickr_default_userid'] = $user;
     }
@@ -596,4 +592,52 @@ function flickr_admin_settings_submit($form, &$form_state) {
     $info = flickr_people_getinfo($form_state['values']['flickr_default_userid']);
     drupal_set_message(t("The Flickr user associated with '%uid' will be shown to you as Flickr user '%userid'.", array('%uid' => $form_state['values']['flickr_default_userid'], '%userid' => $info['username']['_content'])));
   }
+  $config = config('flickr.settings');
+  foreach ($form_state['values'] as $key => $value) {
+    $config->set($key, $value);
+  }
+  $config->save();
+  if (module_exists('flickr_block')) {
+    $config = config('flickr_block.settings');
+    foreach ($form_state['values'] as $key => $value) {
+      $config->set($key, $value);
+    }
+    $config->save();
+  }
+  if (module_exists('flickrcachewarmer')) {
+    $config = config('flickrcachewarmer.settings');
+    foreach ($form_state['values'] as $key => $value) {
+      $config->set($key, $value);
+    }
+    $config->save();
+  }
+  if (module_exists('flickr_filter')) {
+    $config = config('flickr_filter.settings');
+    foreach ($form_state['values'] as $key => $value) {
+      $config->set($key, $value);
+    }
+    $config->save();
+  }
+  if (module_exists('flickr_sets')) {
+    $config = config('flickr_sets.settings');
+    foreach ($form_state['values'] as $key => $value) {
+      $config->set($key, $value);
+    }
+    $config->save();
+  }
+  if (module_exists('flickrstyle')) {
+    $config = config('flickrstyle.settings');
+    foreach ($form_state['values'] as $key => $value) {
+      $config->set($key, $value);
+    }
+    $config->save();
+  }
+  if (module_exists('flickr_tags')) {
+    $config = config('flickr_tags.settings');
+    foreach ($form_state['values'] as $key => $value) {
+      $config->set($key, $value);
+    }
+    $config->save();
+  }
+  backdrop_set_message(t('The configuration options have been saved.'));
 }
diff --git a/flickr.api.inc b/flickr.api.inc
index 848fbd4..bec5c7d 100644
--- a/flickr.api.inc
+++ b/flickr.api.inc
@@ -82,7 +82,8 @@ function flickr_photos_search($nsid, $page = 1, $other_args = array()) {
   }
   // Set per_page to flickr module default if not specified in $other_args.
   if (!isset($other_args['per_page'])) {
-    $args['per_page'] = variable_get('flickr_photos_per_page', 6);
+    $args['per_page'] = config_get('flickr.settings', 'flickr_
+photos_per_page');
   }
 
   $response = flickr_request('flickr.photos.search', array_merge($args, $other_args));
@@ -112,7 +113,8 @@ function flickr_favorites_getpubliclist($nsid, $page = 1, $other_args = array())
 
   // Set per_page to flickr module default if not specified in $other_args.
   if (!isset($other_args['per_page'])) {
-    $args['per_page'] = variable_get('flickr_photos_per_page', 6);
+    $args['per_page'] = config_get('flickr.settings', 'flickr_
+photos_per_page');
   }
 
   $response = flickr_request('flickr.favorites.getPublicList', array_merge($args, $other_args));
@@ -154,7 +156,8 @@ function flickr_photosets_getinfo($photoset_id) {
  *   (https://www.flickr.com/services/api/flickr.photosets.getList.html)
  */
 function flickr_photosets_getlist($nsid, $page = NULL) {
-  $per_page = (!empty($page)) ? variable_get('flickr_sets_per_page', 8) : '';
+  $per_page = (!empty($page)) ? config_get('flickr.settings', 'flickr_
+sets_per_page') : '';
   $response = flickr_request(
     'flickr.photosets.getList',
     array(
@@ -211,7 +214,8 @@ function flickr_photosets_getphotos($photoset_id, $other_args = array(), $page =
 
   // Set per_page to flickr module default if not specified in $other_args.
   if (!isset($other_args['per_page'])) {
-    $args['per_page'] = variable_get('flickr_photos_per_page', 6);
+    $args['per_page'] = config_get('flickr.settings', 'flickr_
+photos_per_page');
   }
 
   $response = flickr_request('flickr.photosets.getPhotos', array_merge($args, $other_args));
@@ -399,7 +403,8 @@ function flickr_galleries_getphotos($id, $page = 1, $other_args = array()) {
 
   // Set per_page to flickr module default if not specified in $other_args.
   if (!isset($other_args['per_page'])) {
-    $args['per_page'] = variable_get('flickr_photos_per_page', 6);
+    $args['per_page'] = config_get('flickr.settings', 'flickr_
+photos_per_page');
   }
 
   $response = flickr_request('flickr.galleries.getPhotos', array_merge($args, $other_args));
@@ -448,7 +453,8 @@ function flickr_people_getpublicphotos($nsid, $page = 1, $other_args = array())
 
   // Set per_page to flickr module default if not specified in $other_args.
   if (!isset($other_args['per_page'])) {
-    $args['per_page'] = variable_get('flickr_photos_per_page', 6);
+    $args['per_page'] = config_get('flickr.settings', 'flickr_
+photos_per_page');
   }
 
   $response = flickr_request('flickr.people.getPublicPhotos', array_merge($args, $other_args));
diff --git a/flickr.css b/flickr.css
deleted file mode 100644
index 809bec6..0000000
--- a/flickr.css
+++ /dev/null
@@ -1,106 +0,0 @@
-.flickr-photo-img {
-  vertical-align: text-bottom;
-}
-
-.flickr-photo-box {
-  float: left;
-  width: 260px;
-  height: 260px;
-  padding: 10px;
-  text-align: center;
-}
-
-.flickr-photoset-img {
-  vertical-align: text-bottom;
-}
-
-.flickr-photoset-box {
-  float: left;
-  padding: 10px;
-  text-align: center;
-}
-
-span.flickr-wrap,
-span.flickr-photoset-single {
-  position: relative;
-  display: inline-block;
-  margin: 0 5px 5px 0;
-  vertical-align: top;
-}
-
-span.flickr-credit {
-  display: block;
-  overflow: hidden;
-  padding: 0 0 4px 4px;
-  font-size: 80%;
-  line-height: 100%;
-}
-
-.flickr-slideshow {
-  position: relative;
-  overflow: hidden;
-  width: 100%;
-  height: 0;
-  /*Change percentage below to change ratio. Currently 16:9 (as most screens).*/
-  padding-bottom: 56.25%;
-}
-
-.flickr-slideshow object {
-  position: absolute;
-  top: 0;
-  left: 0;
-}
-
-.flickr-block-photosets .flickr-block-photoset {
-  margin-top: 0.5em;
-  padding-top: 0.5em;
-  border-top: 1px solid #dfdfdf;
-}
-
-span.floatleft {
-  float: left; /* LTR */
-  margin: 5px 5px 0 0; /* LTR */
-}
-span.floatright {
-  float: right; /* LTR */
-  margin: 5px 0 0 10px; /* LTR */
-}
-
-span.flickr-tags {
-  font-style: italic;
-}
-
-.flickr-wrap,
-.flickr-wrap img,
-.flickr-wrap .flickr-credit {
-  /*See http://stackoverflow.com/a/11390432/523688*/
-  -webkit-box-sizing: border-box;
-     -moz-box-sizing: border-box;
-          box-sizing: border-box;
-  max-width: 100%;
-}
-
-div.flickr-photoset {
-  clear: both;
-}
-
-span.flickr-empty {
-  display: inline-block;
-  margin: 10px;
-}
-
-.page-flickr-sets h1#page-title {
-  display: none;
-}
-
-.tips span.ctools-toggle {
-  float: none !important;
-}
-
-span.grayed-out {
-  color: darkgray;
-}
-
-span.grayed-out-help {
-  color: #666;
-}
diff --git a/flickr.inc b/flickr.inc
index 66fdaec..5f0a472 100644
--- a/flickr.inc
+++ b/flickr.inc
@@ -92,7 +92,7 @@ function flickr_photo_sizes() {
  */
 function flickr_request($method, $args, $cacheable = TRUE, $return_errors = FALSE) {
   // Add in additional parameters then sort them for signing.
-  $args['api_key'] = trim(variable_get('flickr_api_key', ''));
+  $args['api_key'] = trim(config_get('flickr.settings', 'flickr_api_key'));
   $args['method'] = $method;
   $args['format'] = 'json';
   $args['nojsoncallback'] = 1;
@@ -104,7 +104,7 @@ function flickr_request($method, $args, $cacheable = TRUE, $return_errors = FALS
     $arg_hash .= $k . $v;
   }
   // If we've got a secret, sign the arguments.
-  if ($secret = trim(variable_get('flickr_api_secret', ''))) {
+  if ($secret = trim(config_get('flickr.settings', 'flickr_api_secret'))) {
     $args['api_sig'] = md5($secret . $arg_hash);
   }
 
@@ -127,7 +127,7 @@ function flickr_request($method, $args, $cacheable = TRUE, $return_errors = FALS
   $cmethod = 'none';
   $result = new stdClass();
   $result->code = 0;
-  if ((variable_get('flickr_curl2', 0) || !function_exists('stream_socket_client')) && function_exists('curl_version')) {
+  if ((config_get('flickr.settings', 'flickr_curl2') || !function_exists('stream_socket_client')) && function_exists('curl_version')) {
     $result = flickr_curl_http_request($url);
     $cmethod = 'cURL';
   }
@@ -146,7 +146,7 @@ function flickr_request($method, $args, $cacheable = TRUE, $return_errors = FALS
     watchdog('flickr', $message, array(), WATCHDOG_WARNING);
     if ($return_errors) {
       // Debug info.
-      if (variable_get('flickr_debug', 0) == 2 && function_exists('dpm')) {
+      if (config_get('flickr.settings', 'flickr_debug') == 2 && function_exists('dpm')) {
         dpm("Value of error 'result' in 'function flickr_request()' with connection method " . "'" . $cmethod . "' in 'flickr.inc':");
         dpm($result);
       }
@@ -162,7 +162,7 @@ function flickr_request($method, $args, $cacheable = TRUE, $return_errors = FALS
     // Even the cURL method returns an error.
     if ($result->code != 200) {
       // Debug info.
-      if (variable_get('flickr_debug', 0) == 2 && function_exists('dpm')) {
+      if (config_get('flickr.settings', 'flickr_debug') == 2 && function_exists('dpm')) {
         dpm("Value of 'result' with error in 'function flickr_request()' with connection method " . "'" . $cmethod . "' in 'flickr.inc':");
         dpm($result);
       }
@@ -177,7 +177,7 @@ function flickr_request($method, $args, $cacheable = TRUE, $return_errors = FALS
 
   }
   // Debug info.
-  if (variable_get('flickr_debug', 0) == 2 && function_exists('dpm')) {
+  if (config_get('flickr.settings', 'flickr_debug') == 2 && function_exists('dpm')) {
     dpm("Value of 'result' in 'function flickr_request()' with the " . "'" . $cmethod . "' connection method in 'flickr.inc':");
     dpm($result);
   }
@@ -203,7 +203,7 @@ function flickr_request($method, $args, $cacheable = TRUE, $return_errors = FALS
     flickr_set_error($response);
     return FALSE;
   }
-  elseif (isset($args) && variable_get('flickr_debug', 0)) {
+  elseif (isset($args) && config_get('flickr.settings', 'flickr_debug')) {
     $args['format'] = 'rest';
     unset($args['api_sig']);
     $attribs = urldecode(http_build_query($args, '', '&'));
@@ -240,7 +240,7 @@ function flickr_request($method, $args, $cacheable = TRUE, $return_errors = FALS
 
   // Save cacheable results for future use.
   if ($cacheable) {
-    cache_set("flickr_$arg_hash", $result->data, 'cache', time() + variable_get('flickr_cache_duration', 3600));
+    cache_set("flickr_$arg_hash", $result->data, 'cache', time() + config_get('flickr.settings', 'flickr_cache_duration'));
   }
 
   return $response;
@@ -263,7 +263,7 @@ function flickr_request($method, $args, $cacheable = TRUE, $return_errors = FALS
  */
 function flickr_img($photo, $size = NULL, $attributes = NULL) {
   // Debug info.
-  if (variable_get('flickr_debug', 0) == 2 && function_exists('dpm')) {
+  if (config_get('flickr.settings', 'flickr_debug') == 2 && function_exists('dpm')) {
     dpm("Value of 'photo' passed to 'function flickr_img()' in 'flickr.inc':");
     dpm($photo);
   }
@@ -317,8 +317,8 @@ function flickr_img($photo, $size = NULL, $attributes = NULL) {
   }
   $info = !is_array($photo['title']) ? flickr_photos_getinfo($photo['id']) : '';
   if (isset($info['dates']) || isset($photo['dates'])) {
-    $date_taken = is_array($info) && isset($info['dates']['taken']) ? $info['dates']['taken'] : $photo['dates']['taken'];
-    $format_title = variable_get('flickr_date_format_image_title', 'medium');
+    $date_taken = isset($info['dates']['taken']) ? $info['dates']['taken'] : $photo['dates']['taken'];
+    $format_title = config_get('flickr.settings', 'flickr_date_format_image_title');
     switch ($format_title) {
       case 'interval':
         $taken_short = format_interval(time() - strtotime($date_taken), 1) . ' ' . t('ago');
@@ -338,18 +338,13 @@ function flickr_img($photo, $size = NULL, $attributes = NULL) {
     $title = is_array($photo['title']) ? str_replace('"', "'", htmlspecialchars_decode(strip_tags($photo['title']['_content']))) : $photo['title'];
   }
   $title = $taken_short . $title;
-  $overlay = variable_get('flickr_info_overlay', array(
-    'title' => 'title',
-    'metadata' => 'metadata',
-    'description' => 'description',
-    'license' => 0,
-  ));
+  $overlay = config_get('flickr.settings', 'flickr_info_overlay');
   $title = (gettype($overlay['description']) == 'integer') ? $photo['title'] : $title;
-  if (module_exists('jcaption') && (variable_get('flickr_class') != NULL || variable_get('flickr_rel') != NULL)) {
+  if (module_exists('jcaption') && (config_get('flickr.settings', 'flickr_class') != NULL || config_get('flickr.settings', 'flickr_rel') != NULL)) {
     $title = '';
   }
   return theme('image', array(
-    'path' => $img_url,
+    'uri' => $img_url,
     'alt' => $title,
     'title' => $title,
     'attributes' => $attributes,
@@ -662,10 +657,10 @@ function flickr_album($type = 'user', $id = '39873962@N08', $show_n = NULL, $siz
       drupal_set_message(t("The tag mode has been forced to 'any' (OR) for extended text matching (tags, titles and description). To use 'all' (AND) put 'extend=false' in Flickr's text filter code."), 'warning', FALSE);
     }
     $sizes = flickr_photo_sizes();
-    $show_n = is_null($show_n) ? variable_get('flickr_photos_per_page', 6) : $show_n;
-    $size = is_null($size) ? variable_get('flickr_default_size_album', 's') : $size;
-    $min_title = is_null($min_title) ? variable_get('flickr_title_suppress_on_small', '100') : $min_title;
-    $min_metadata = is_null($min_metadata) ? variable_get('flickr_metadata_suppress_on_small', '150') : $min_metadata;
+    $show_n = is_null($show_n) ? config_get('flickr.settings', 'flickr_photos_per_page') : $show_n;
+    $size = is_null($size) ? config_get('flickr.settings', 'flickr_default_size_album') : $size;
+    $min_title = is_null($min_title) ? config_get('flickr.settings', 'flickr_title_suppress_on_small') : $min_title;
+    $min_metadata = is_null($min_metadata) ? config_get('flickr.settings', 'flickr_metadata_suppress_on_small') : $min_metadata;
     if ($show_n > 1 || is_numeric($delta)) {
       $output = '<div class="flickr-photoset">';
     }
@@ -799,7 +794,7 @@ function flickr_album($type = 'user', $id = '39873962@N08', $show_n = NULL, $siz
 
     $tagged = (empty($tags) || $size == 'x' || $size == 'y') ? '' : '<span class="flickr-tags-wrap">' . $flickr;
     // A single date.
-    $format = empty($datefrom) ? 'none' : variable_get('flickr_date_format_album_title', 'short');
+    $format = empty($datefrom) ? 'none' : config_get('flickr.settings', 'flickr_date_format_album_title');
     switch ($format) {
       case 'interval':
         $formated_datefrom = format_interval(time() - strtotime(substr($datefrom, 0, 10)), 1);
@@ -856,7 +851,7 @@ function flickr_album($type = 'user', $id = '39873962@N08', $show_n = NULL, $siz
             'target' => '_blank',
           ),
         ));
-        $map = variable_get('flickr_maps', 0) ? '(' . l(t('map'), $people['photosurl'] . 'sets/' . $id . '/map/', array(
+        $map = config_get('flickr.settings', 'flickr_maps') ? '(' . l(t('map'), $people['photosurl'] . 'sets/' . $id . '/map/', array(
           'attributes' => array(
             'title' => t('View set on Flickr map.'),
             'target' => '_blank',
@@ -943,7 +938,7 @@ function flickr_album($type = 'user', $id = '39873962@N08', $show_n = NULL, $siz
       // User and group albums.
       default:
         if (!empty($tags) && strpos($tags, ',') == FALSE) {
-          $map = variable_get('flickr_maps', 0) ? '(' . l(t('map'), $people['photosurl'] . 'tags/' . $tags . '/map/', array(
+          $map = config_get('flickr.settings', 'flickr_maps') ? '(' . l(t('map'), $people['photosurl'] . 'tags/' . $tags . '/map/', array(
             'attributes' => array(
               'title' => t('View tagged photos on Flickr map.'),
               'target' => '_blank',
@@ -951,7 +946,7 @@ function flickr_album($type = 'user', $id = '39873962@N08', $show_n = NULL, $siz
           )) . ')' : '';
         }
         else {
-          $map = variable_get('flickr_maps', 0) ? '(' . l(t('map'), $people['photosurl'] . 'map/', array(
+          $map = config_get('flickr.settings', 'flickr_maps') ? '(' . l(t('map'), $people['photosurl'] . 'map/', array(
             'attributes' => array(
               'title' => t('View user photos on Flickr map.'),
               'target' => '_blank',
@@ -969,13 +964,10 @@ function flickr_album($type = 'user', $id = '39873962@N08', $show_n = NULL, $siz
         if (isset($lat)) {
           $place_id = flickr_places_findbylatlon($lat, $lon);
           $place_name = $place_id['places']['place'][0]['name'];
-          $geophp = variable_get('flickr_geophp', array(
-            'title' => 'title',
-            'caption' => 0,
-          ));
+          $geophp = config_get('flickr.settings', 'flickr_geophp');
           if (gettype($geophp['title']) != 'integer') {
             $google = 'https://maps.googleapis.com/maps/api/geocode/json?latlng=' . $lat . ',' . $lon;
-            if ((variable_get('flickr_curl2', 0) || !function_exists('stream_socket_client')) && function_exists('curl_version')) {
+            if ((config_get('flickr.settings', 'flickr_curl2') || !function_exists('stream_socket_client')) && function_exists('curl_version')) {
               $result = flickr_curl_http_request($google);
             }
             elseif (function_exists('stream_socket_client')) {
@@ -1108,7 +1100,7 @@ function flickr_album($type = 'user', $id = '39873962@N08', $show_n = NULL, $siz
         // For recent sorted photos this is 4 x the displayed number to provide
         // a sufficient distinction between recently uploaded and recently
         // taken.
-        $per_page = ($sort == 'random' || $sort == 'views') ? variable_get('flickr_per_page', 100) : 4 * $show_n;
+        $per_page = ($sort == 'random' || $sort == 'views') ? config_get('flickr.settings', 'flickr_per_page') : 4 * $show_n;
         // ...but if unsorted or user/date, limit it more (except size 'n')...
         $per_page = (($sort == 'unsorted' || ($type == 'user' && ($sort == 'date-taken-desc' || $sort == 'date-posted-desc') && empty($filter))) && $size != 'n') ? $show_n : $per_page;
         // When we have a photoset, gallery or favorites, use the maximum...
@@ -1116,15 +1108,15 @@ function flickr_album($type = 'user', $id = '39873962@N08', $show_n = NULL, $siz
         // ...but when filtering on muiltiple tags in groups, use the maximum.
         $per_page = (strpos($tags, ',') !== FALSE && $type == 'group') || ($id == '39873962@N08' && $sort == 'date-taken-desc' && empty($filter)) ? $total : $per_page;
         // Fallback: Avoid that $page can be empty or 0.
-        $per_page = isset($page) && $per_page > 0 ? $per_page : variable_get('flickr_per_page', 100);
+        $per_page = isset($page) && $per_page > 0 ? $per_page : config_get('flickr.settings', 'flickr_per_page');
         // If we could have a response of over [variable_get('flickr_per_page',
         // 100)] photos, we want a random sort to take a random page first, so
         // any photos could be taken (not only from the most recent batch).
         // The amount in the last page has to be sufficient to draw a random.
-        $rest_ok = ($total % variable_get('flickr_per_page', 100)) > 3 * $show_n ? 1 : 0;
-        $page = ($sort == 'random' && isset($total) && $total > variable_get('flickr_per_page', 100) && empty($tags)) ? mt_rand(1, floor($total / variable_get('flickr_per_page', 100)) + $rest_ok) : $page;
+        $rest_ok = ($total % config_get('flickr.settings', 'flickr_per_page')) > 3 * $show_n ? 1 : 0;
+        $page = ($sort == 'random' && isset($total) && $total > config_get('flickr.settings', 'flickr_per_page', 100) && empty($tags)) ? mt_rand(1, floor($total / config_get('flickr.settings', 'flickr_per_page')) + $rest_ok) : $page;
         // Debug info.
-        if (variable_get('flickr_debug', 0) == 2 && function_exists('dpm')) {
+        if (config_get('flickr.settings', 'flickr_debug') == 2 && function_exists('dpm')) {
           dpm("Arguments passed to 'function flickr_album()': " . '$type=' . $type . ' $delta=' . $delta . ' $id=' . $id . ' $sort=' . $sort . ' $filter=' . $filter . ' $page=' . $page . ' $per_page=' . $per_page . ' $tags=' . $tags . ' $vocab_isset=' . $vocab_isset . ' $total=' . $total . ' $lat=' . $lat . ' $lon=' . $lon . ' $radius=' . $radius . '$datefrom=' . $datefrom . ' $dateto=' . $dateto . ' $extend=' . $extend . ' $tag_mode=' . $tag_mode . ' $class=' . $class . ' $style=' . $style . ' $page=' . $page);
         }
         // Get a list of "all" the photos. This is cached.
@@ -1205,7 +1197,7 @@ function flickr_album($type = 'user', $id = '39873962@N08', $show_n = NULL, $siz
               // Start with a circle of 14 meter.
               $radius = empty($radius) ? 0.014 : $radius;
               do {
-                if (variable_get('flickr_restrict', 1) < 2) {
+                if (config_get('flickr.settings', 'flickr_restrict') < 2) {
                   $response = flickr_photos_search($id, $page, array(
                     'group_id' => $group_id,
                     'tags' => $tags_combined,
@@ -1241,7 +1233,7 @@ function flickr_album($type = 'user', $id = '39873962@N08', $show_n = NULL, $siz
                   }
                 }
                 // No results, to extend the search on license.
-                if ((empty($response['photo']) || variable_get('flickr_restrict', 1) == 2) && variable_get('flickr_restrict', 1) != 0) {
+                if ((empty($response['photo']) || config_get('flickr.settings', 'flickr_restrict') == 2) && config_get('flickr.settings', 'flickr_restrict') != 0) {
                   $response = flickr_photos_search($id, $page, array(
                     'group_id' => $group_id,
                     'tags' => $tags_combined,
@@ -1282,7 +1274,7 @@ function flickr_album($type = 'user', $id = '39873962@N08', $show_n = NULL, $siz
               } while ((count($response['photo']) + count($textext)) < $show_n && $radius <= 32);
             }
             else {
-              if (variable_get('flickr_restrict', 1) < 2) {
+              if (config_get('flickr.settings', 'flickr_restrict') < 2) {
                 $response = flickr_photos_search($id, $page, array(
                   'group_id' => $group_id,
                   'tags' => $tags_combined,
@@ -1311,7 +1303,7 @@ function flickr_album($type = 'user', $id = '39873962@N08', $show_n = NULL, $siz
                   $textext = array_merge($textext, $textextension['photo']);
                 }
               }
-              if ((empty($response['photo']) || variable_get('flickr_restrict', 1) == 2) && variable_get('flickr_restrict', 1) != 0) {
+              if ((empty($response['photo']) || config_get('flickr.settings', 'flickr_restrict') == 2) && config_get('flickr.settings', 'flickr_restrict', 1) != 0) {
                 $response = flickr_photos_search($id, $page, array(
                   'group_id' => $group_id,
                   'tags' => $tags_combined,
@@ -1485,7 +1477,7 @@ function flickr_album($type = 'user', $id = '39873962@N08', $show_n = NULL, $siz
           $terms = array_merge($taxs, $texts);
           $done = 0;
           foreach ($photos as $key => $photo) {
-            $phototags = (variable_get('flickr_extend', 1) || $extend) && $extend ? $photo['tags'] . ' ' . strtolower($photo['title']) : $photo['tags'];
+            $phototags = (config_get('flickr.settings', 'flickr_extend') || $extend) && $extend ? $photo['tags'] . ' ' . strtolower($photo['title']) : $photo['tags'];
             foreach ($terms as $term) {
               if (($i >= $show_n && (stripos($phototags, $term) !== FALSE || $type == 'user')) || ($photo['id'] == $done && (stripos($phototags, $term) !== FALSE || $type == 'user'))) {
                 $j++;
@@ -1562,7 +1554,7 @@ function flickr_album($type = 'user', $id = '39873962@N08', $show_n = NULL, $siz
         }
         $output .= '</div>';
 
-        if ($i == 0 && variable_get('flickr_block_hide_empty', 0)) {
+        if ($i == 0 && config_get('flickr.settings', 'flickr_block_hide_empty')) {
           $output = '';
           if (is_numeric($delta) && module_exists('flickr_block')) {
             $refresh = $sort == 'random' ? variable_get('flickr_block_refresh_random', 23) : variable_get('flickr_block_refresh_others', 31);
@@ -1607,7 +1599,7 @@ function flickr_album($type = 'user', $id = '39873962@N08', $show_n = NULL, $siz
         // If the total found > max query ($per_page), omit the counter if tags
         // are applied.
         $terms = isset($terms) ? $terms : 1;
-        $output .= (((variable_get('flickr_counter', 1) && $delta != 'false') || $delta == 'true') && (isset($response['total']) || ($j < $per_page * count($terms) || empty($tags))) && ($show_n > 1 || is_numeric($delta))) ? '<div class="flickr-album-counter">' . $count . '</div>' : '';
+        $output .= (((config_get('flickr.settings', 'flickr_counter') && $delta != 'false') || $delta == 'true') && (isset($response['total']) || ($j < $per_page * count($terms) || empty($tags))) && ($show_n > 1 || is_numeric($delta))) ? '<div class="flickr-album-counter">' . $count . '</div>' : '';
     }
     if ($show_n > 1 || is_numeric($delta)) {
       $output .= '</div>';
diff --git a/flickr.info b/flickr.info
index 1eff94c..b618220 100644
--- a/flickr.info
+++ b/flickr.info
@@ -1,5 +1,6 @@
 name = Flickr
 description = Flickr and Drupal integration.
-core = 7.x
+type = module
+backdrop = 1.x
 package = Flickr
 configure = admin/config/media/flickr
diff --git a/flickr.install b/flickr.install
index 18b44d6..9dc3059 100644
--- a/flickr.install
+++ b/flickr.install
@@ -1,7 +1,7 @@
 <?php
 /**
  * @file
- * The Flickr database schema and uninstall hook.
+ * The Flickr database schema, update and install hooks.
  */
 
 /**
@@ -9,51 +9,16 @@
  */
 function flickr_install() {
   if (module_exists('colorbox')) {
-    variable_set('flickr_class', 'colorbox');
-    variable_set('flickr_rel', 'gallery-all');
-    variable_set('colorbox_inline', 1);
+    config_set('flickr.settings', 'flickr_class', 'colorbox');
+    config_set('flickr.settings', 'flickr_rel', 'gallery-all');
+    config_set('colorbox.settings', 'colorbox_inline', 1);
   }
   elseif (module_exists('lightbox2')) {
-    variable_set('flickr_rel', 'lightbox[gallery]');
+    config_set('flickr.settings', 'flickr_rel', 'lightbox[gallery]');
   }
 }
 
 /**
- * Implements hook_uninstall().
- */
-function flickr_uninstall() {
-  variable_del('flickr_api_key');
-  variable_del('flickr_api_secret');
-  variable_del('flickr_cache_duration');
-  variable_del('flickr_cc');
-  variable_del('flickr_class');
-  variable_del('flickr_css');
-  variable_del('flickr_curl');
-  variable_del('flickr_curl2');
-  variable_del('flickr_debug');
-  variable_del('flickr_default_size_album');
-  variable_del('flickr_default_userid');
-  variable_del('flickr_opening_size');
-  variable_del('flickr_per_page');
-  variable_del('flickr_photos_per_page');
-  variable_del('flickr_rel');
-  variable_del('flickr_title_suppress_on_small');
-  variable_del('flickr_metadata_suppress_on_small');
-  variable_del('flickr_info_overlay');
-  variable_del('flickr_license');
-  variable_del('flickr_restrict');
-  variable_del('flickr_extend');
-  variable_del('flickr_counter');
-  variable_del('flickr_maps');
-  variable_del('flickr_geophp');
-  variable_del('flickr_smart');
-  variable_del('flickr_date_format_image_title');
-  variable_del('flickr_date_format_image_caption');
-  variable_del('flickr_date_format_image_caption_hover');
-  variable_del('flickr_date_format_album_title');
-}
-
-/**
  * Implements hook_schema().
  */
 function flickr_schema() {
@@ -84,49 +49,85 @@ function flickr_schema() {
 }
 
 /**
- * Create new index 'license' on the variable 'flickr_info_overlay'.
+ * Implements hook_update_last_removed().
  */
-function flickr_update_7001() {
-  $overlay = variable_get('flickr_info_overlay', array(
-    'title' => 'title',
-    'metadata' => 'metadata',
-    'description' => 'description',
-    'license' => 0,
-  ));
-  if (!isset($overlay['license'])) {
-    variable_set('flickr_info_overlay', array(
-      'title' => 'title',
-      'metadata' => 'metadata',
-      'description' => 'description',
-      'license' => 0,
-    ));
-  }
+function flickr_update_last_removed() {
+  return 7103;
 }
 
 /**
- * Removes old unused variables.
+ * Move flickr settings from variables to config.
  */
-function flickr_update_7101() {
-  variable_del("flickr_default_size");
-}
+function flickr_update_1000() {
+  // Migrate variables to config.
+  $config = config('flickr.settings');
+  $config->set('flickr_api_key', update_variable_get('flickr_api_key', ''));
+  $config->set('flickr_api_secret', update_variable_get('flickr_api_secret', ''));
+  $config->set('flickr_cache_duration', update_variable_get('flickr_cache_duration', 3600));
+  $config->set('flickr_cc', update_variable_get('flickr_cc', 0));
+  $config->set('flickr_class', update_variable_get('flickr_class', ''));
+  $config->set('flickr_css', update_variable_get('flickr_css', 1));
+  $config->set('flickr_curl', update_variable_get('flickr_curl', 0));
+  $config->set('flickr_curl2', update_variable_get('flickr_curl2', 0));
+  $config->set('flickr_debug', update_variable_get('flickr_debug', 0));
+  $config->set('flickr_default_size_album', update_variable_get('flickr_default_size_album', 's'));
+  $config->set('flickr_default_userid', update_variable_get('flickr_default_userid', ''));
+  $config->set('flickr_opening_size', update_variable_get('flickr_opening_size', ''));
+  $config->set('flickr_per_page', update_variable_get('flickr_per_page', 100));
+  $config->set('flickr_photos_per_page', update_variable_get('flickr_photos_per_page', 6));
+  $config->set('flickr_rel', update_variable_get('flickr_rel', ''));
+  $config->set('flickr_title_suppress_on_small', update_variable_get('flickr_title_suppress_on_small', '100'));
+  $config->set('flickr_metadata_suppress_on_small', update_variable_get('flickr_metadata_suppress_on_small', '150'));
+  $config->set('flickr_license', update_variable_get('flickr_license', 1));
+  $config->set('flickr_restrict', update_variable_get('flickr_restrict', 1));
+  $config->set('flickr_extend', update_variable_get('flickr_extend', 1));
+  $config->set('flickr_counter', update_variable_get('flickr_counter', 1));
+  $config->set('flickr_maps', update_variable_get('flickr_maps', 0));
+  $config->set('flickr_smart', update_variable_get('flickr_smart', 1));
+  $config->set('flickr_date_format_image_title', update_variable_get('flickr_date_format_image_title', 'medium'));
+  $config->set('flickr_date_format_image_caption', update_variable_get('flickr_date_format_image_caption', 'interval'));
+  $config->set('flickr_date_format_image_caption_hover', update_variable_get('flickr_date_format_image_caption_hover', 'long'));
+  $config->set('flickr_date_format_album_title', update_variable_get('flickr_date_format_album_title', 'short'));
+  $config->set('flickr_info_overlay', update_variable_get('flickr_info_overlay', array(
+    "title",
+    "metadata",
+    "description",
+    0,
+  )));
+  $config->set('flickr_geophp', update_variable_get('flickr_geophp', array(
+    "title",
+    0,
+  )));
+  $config->save();
 
-/**
- * Enable 'Colorbox inline' to allow playing videos inside Colorbox.
- */
-function flickr_update_7102() {
-  if (module_exists('colorbox')) {
-    variable_set('flickr_class', 'colorbox');
-    variable_set('flickr_rel', 'gallery-all');
-    variable_set('colorbox_inline', 1);
-  }
-  elseif (module_exists('lightbox2')) {
-    variable_set('flickr_rel', 'lightbox[gallery]');
-  }
-}
-
-/**
- * Delete unused variables.
- */
-function flickr_update_7103() {
-  variable_del('flickr_caption_padding');
+  // Delete variables.
+  update_variable_del('flickr_api_key');
+  update_variable_del('flickr_api_secret');
+  update_variable_del('flickr_cache_duration');
+  update_variable_del('flickr_cc');
+  update_variable_del('flickr_class');
+  update_variable_del('flickr_css');
+  update_variable_del('flickr_curl');
+  update_variable_del('flickr_curl2');
+  update_variable_del('flickr_debug');
+  update_variable_del('flickr_default_size_album');
+  update_variable_del('flickr_default_userid');
+  update_variable_del('flickr_opening_size');
+  update_variable_del('flickr_per_page');
+  update_variable_del('flickr_photos_per_page');
+  update_variable_del('flickr_rel');
+  update_variable_del('flickr_title_suppress_on_small');
+  update_variable_del('flickr_metadata_suppress_on_small');
+  update_variable_del('flickr_license');
+  update_variable_del('flickr_restrict');
+  update_variable_del('flickr_extend');
+  update_variable_del('flickr_counter');
+  update_variable_del('flickr_maps');
+  update_variable_del('flickr_smart');
+  update_variable_del('flickr_date_format_image_title');
+  update_variable_del('flickr_date_format_image_caption');
+  update_variable_del('flickr_date_format_image_caption_hover');
+  update_variable_del('flickr_date_format_album_title');
+  update_variable_del('flickr_info_overlay');
+  update_variable_del('flickr_geophp');
 }
diff --git a/flickr.module b/flickr.module
index 562c6aa..43368a8 100644
--- a/flickr.module
+++ b/flickr.module
@@ -8,23 +8,27 @@
 module_load_include('inc', 'flickr');
 
 /**
- * Implements hook_help().
+ * Implements hook_config_info().
  */
-function flickr_help($path, $arg) {
-  switch ($path) {
-    case 'admin/help#flickr':
-      // Return a line-break version of the README.txt.
-      return _filter_autop(file_get_contents(dirname(__FILE__) . '/README.txt'));
-  }
+function flickr_config_info() {
+  $prefixes['flickr.settings'] = array(
+    'label' => t('Flickr settings'),
+    'group' => t('Flickr'),
+  );
+  return $prefixes;
 }
 
 /**
- * Implements hook_page_build().
+ * Implements hook_init().
  */
-function flickr_page_build(&$page) {
+function flickr_init() {
+  static $already_added = FALSE;
+  if ($already_added) {
+    return; // Don't add the JavaScript and CSS multiple times.
+  }
   // Determine the setting to use flickr.css or not.
   if (variable_get('flickr_css', 1)) {
-    drupal_add_css(drupal_get_path('module', 'flickr') . '/flickr.css', array(
+    backdrop_add_css(backdrop_get_path('module', 'flickr') . '/css/flickr.css', array(
       'group' => CSS_DEFAULT,
       'every_page' => TRUE,
     ));
@@ -32,15 +36,15 @@ function flickr_page_build(&$page) {
   // Determine the setting to use flickr_license_overlay.css or not (license
   // icon on the image).
   if (variable_get('flickr_license', 1) == 1) {
-    drupal_add_css(drupal_get_path('module', 'flickr') . '/flickr_cc_icons_on_hover.css', array(
+    backdrop_add_css(backdrop_get_path('module', 'flickr') . '/css/flickr_cc_icons_on_hover.css', array(
       'group' => CSS_DEFAULT,
       'every_page' => TRUE,
     ));
   }
   // Determine the setting to use flickr_cc_icons.css or not (license info in
   // the caption).
-  if (variable_get('flickr_license', 0)) {
-    drupal_add_css(drupal_get_path('module', 'flickr') . '/flickr_cc_icons.css', array(
+  if (variable_get('flickr_license', 1) == 3) {
+    backdrop_add_css(backdrop_get_path('module', 'flickr') . '/css/flickr_cc_icons.css', array(
       'group' => CSS_DEFAULT,
       'every_page' => TRUE,
     ));
@@ -51,9 +55,10 @@ function flickr_page_build(&$page) {
   // pages. It mangled the dragging of block weight on admin/structure/block.
   if (function_exists('_colorbox_active') && !path_is_admin($_GET['q']) && variable_get('flickr_class', '') == 'colorbox') {
     if (variable_get('colorbox_style', 'default') == 'default' && _colorbox_active()) {
-      drupal_add_js(drupal_get_path('module', 'flickr') . '/flickr_colorbox.js');
+      backdrop_add_js(backdrop_get_path('module', 'flickr') . '/js/flickr_colorbox.js');
     }
   }
+  $already_added = TRUE;
 }
 
 /**
@@ -62,7 +67,7 @@ function flickr_page_build(&$page) {
 function flickr_menu() {
   $items['admin/config/media/flickr'] = array(
     'title' => 'Flickr',
-    'page callback' => 'drupal_get_form',
+    'page callback' => 'backdrop_get_form',
     'page arguments' => array('flickr_admin_settings'),
     'access arguments' => array('administer site configuration'),
     'description' => 'Change settings for the flickr module.',
@@ -263,18 +268,18 @@ function flickr_user_load($users) {
 /**
  * Implements hook_user_presave().
  */
-function flickr_user_presave(&$edit, $account, $category) {
-  if (isset($edit['flickr_identifier'])) {
+function flickr_user_presave($account) {
+  if (isset($account->flickr_identifier)) {
     db_delete('flickr_users')
       ->condition('uid', $account->uid)
       ->execute();
     // $user_affected = db_affected_rows();
-    if (!empty($edit['flickr_identifier'])) {
+    if (!empty($account->flickr_identifier)) {
       $id = db_insert('flickr_users')
         ->fields(array(
           'uid' => $account->uid,
-          'nsid' => flickr_user_find_by_identifier($edit['flickr_identifier']),
-          'identifier' => $edit['flickr_identifier'],
+          'nsid' => flickr_user_find_by_identifier($account->flickr_identifier),
+          'identifier' => $account->flickr_identifier,
         ))
         ->execute();
     }
@@ -302,21 +307,15 @@ function flickr_user_delete($account) {
  * Adds the Flickr form to the user profile form.
  */
 function flickr_form_user_profile_form_alter(&$form, &$form_state) {
-  if ($form['#user_category'] == 'account' && (user_access('view own flickr photos') || user_access('administer flickr'))) {
+  if (user_access('view own flickr photos') || user_access('administer flickr')) {
     $account = $form['#user'];
-    $form['flickr'] = array(
-      '#type' => 'fieldset',
-      '#title' => t('Flickr settings'),
-      '#collapsible' => FALSE,
-      '#weight' => 4,
-      '#tree' => FALSE,
-    );
-    $form['flickr']['flickr_identifier'] = array(
+    $form['flickr_identifier'] = array(
       '#type' => 'textfield',
       '#title' => t('Flickr identifier'),
       '#default_value' => empty($account->flickr['identifier']) ? '' : $account->flickr['identifier'],
       '#description' => t('Enter either your Flickr username, URL path alias, the email address associated with your Flickr account, or your Flickr NSID. Leave this box empty to delete your Flickr page on this site.'),
       '#maxlength' => 64,
+      '#weight' => 3,
     );
     $form['#validate'][] = 'flickr_user_account_form_validate';
   }
@@ -721,7 +720,7 @@ function theme_flickr_photo($variables) {
   $licenselong = (gettype($overlay['license']) == 'integer') ? '' : $licenselong;
   $overlayhtml = $overlaytitle . $metadata . $description . $licenselong;
   // Optionally use the GPL licensed magnifier image supplied with the module.
-  $magnifier = (variable_get('flickrstyle_emphasize', 2) == 4) ? '<span class="hover-icon"><img src="/' . drupal_get_path('module', 'flickr') . '/style/img/magnifier.png' . '" style="width:50px;height:50px;"></span>' : '';
+  $magnifier = (variable_get('flickrstyle_emphasize', 2) == 4) ? '<span class="hover-icon"><img src="/' . backdrop_get_path('module', 'flickr') . '/style/img/magnifier.png' . '" style="width:50px;height:50px;"></span>' : '';
   // Final step when NO overlay browser is used that generates the image that
   // links to the Flickr page to comply with the TOS of Flickr.
   if (variable_get('flickr_class') == NULL && variable_get('flickr_rel') == NULL && $width < $min_title && $width < $min_metadata) {
diff --git a/flickr_cc_icons.css b/flickr_cc_icons.css
deleted file mode 100644
index d573771..0000000
--- a/flickr_cc_icons.css
+++ /dev/null
@@ -1,69 +0,0 @@
-@font-face {
-  font-family: "CC-ICONS";
-  font-weight: normal;
-  font-style: normal;
-  /*See https://css-tricks.com/snippets/css/using-font-face/*/
-
-  src: url("//cdn.jsdelivr.net/cc-icons/1.2.0/fonts/cc-icons.eot?#iefix") format("embedded-opentype"), /* IE6-IE8 */
-  url("//cdn.jsdelivr.net/cc-icons/1.2.0/fonts/cc-icons.woff") format("woff"), /* Modern Browsers */
-  url("//cdn.jsdelivr.net/cc-icons/1.2.0/fonts/cc-icons.ttf") format("truetype"), /* Safari, Android, iOS */
-  url("//cdn.jsdelivr.net/cc-icons/1.2.0/fonts/cc-icons.svg#cc-icons") format("svg"); /* Legacy iOS */
-}
-span.flickr-cc,
-span.flickr-copyright {
-  /*An equivalent to baseline shift to space icons from the line above*/
-  position: relative;
-  top: 0.2em;
-  float: right;
-  margin: 1px 0 6px 0;
-  /*The normal size is not well recognizable*/
-  font-size: large;
-}
-#flickr-admin-settings span.flickr-cc,
-#flickr-admin-settings span.flickr-copyright {
-  float: none;
-  margin-right: 8px;
-}
-span.flickr-cc a,
-span.flickr-copyright a {
-  text-decoration: none;
-}
-span.flickr-cc {
-  /*Creative commons icon font*/
-  font-family: "CC-ICONS";
-}
-/* Necessary to make the copyright symbol most similar to the cc-icons.*/
-span.flickr-copyright {
-  font-family: "lucida grande",tahoma,verdana,arial,sans-serif;
-  font-size: x-large; /*Change to make the size similar to the CC icons.*/
-  font-weight: bold;
-}
-
-.flickr-image span.flickr-cc,
-.flickr-image span.flickr-copyright {
-  position: absolute;
-  top: 4px;
-  left: 7px;
-}
-
-.flickr-image span.flickr-cc a,
-.flickr-image span.flickr-copyright a {
-  letter-spacing: 2px;
-  color: white;
-  text-shadow: -1px -1px 0 black,
-  1px -1px 0 black,
-  -1px 1px 0 black,
-  1px 1px 0 black;
-}
-
-.flickr-image span.flickr-cc {
-  top: 4px;
-  left: 7px;
-  font-size: 100%;
-}
-
-.flickr-image span.flickr-copyright {
-  top: 3px;
-  left: 7px;
-  font-size: large;
-}
diff --git a/flickr_cc_icons_on_hover.css b/flickr_cc_icons_on_hover.css
deleted file mode 100644
index d3057f1..0000000
--- a/flickr_cc_icons_on_hover.css
+++ /dev/null
@@ -1,12 +0,0 @@
-.flickr-image span.flickr-cc,
-.flickr-image span.flickr-copyright {
-  display: none;
-}
-
-.flickr-image:hover .flickr-image span.flickr-cc,
-.flickr-wrap:hover .flickr-image span.flickr-cc,
-.flickr-image:hover .flickr-image span.flickr-copyright,
-.flickr-wrap:hover .flickr-image span.flickr-copyright {
-  z-index: 100;
-  display: inline;
-}
diff --git a/flickr_colorbox.js b/flickr_colorbox.js
deleted file mode 100644
index e6704bf..0000000
--- a/flickr_colorbox.js
+++ /dev/null
@@ -1,15 +0,0 @@
-(function ($) {
-  Drupal.behaviors.addLinkToColorboxCurrent = {
-    attach: function(context, settings) {
-      var url = $("img[class='cboxPhoto']").attr('src');
-      var regex = new RegExp(/^https?:\/\/([a-z0-9-]+\.)*flickr\.com(\/.*)?$/);
-      if (url && url.match(regex)) {
-        var photo_id = url.split('/')[4];
-        var link = /^[^_]*/.exec(photo_id);
-        var linktext = Drupal.t('View on Flickr.');
-        var linktitle = Drupal.t('Opens in a new tab.');
-        $('#cboxCurrent').append(' <a href="https://flickr.com/photo.gne?id='+link+'" target="_blank" title="'+linktitle+'">'+linktext+'</a>');
-      }
-    }
-  };
-})(jQuery);
diff --git a/js/flickr_colorbox.js b/js/flickr_colorbox.js
new file mode 100644
index 0000000..e6704bf
--- /dev/null
+++ b/js/flickr_colorbox.js
@@ -0,0 +1,15 @@
+(function ($) {
+  Drupal.behaviors.addLinkToColorboxCurrent = {
+    attach: function(context, settings) {
+      var url = $("img[class='cboxPhoto']").attr('src');
+      var regex = new RegExp(/^https?:\/\/([a-z0-9-]+\.)*flickr\.com(\/.*)?$/);
+      if (url && url.match(regex)) {
+        var photo_id = url.split('/')[4];
+        var link = /^[^_]*/.exec(photo_id);
+        var linktext = Drupal.t('View on Flickr.');
+        var linktitle = Drupal.t('Opens in a new tab.');
+        $('#cboxCurrent').append(' <a href="https://flickr.com/photo.gne?id='+link+'" target="_blank" title="'+linktitle+'">'+linktext+'</a>');
+      }
+    }
+  };
+})(jQuery);
diff --git a/sets/README.md b/sets/README.md
new file mode 100644
index 0000000..ad9a35c
--- /dev/null
+++ b/sets/README.md
@@ -0,0 +1,62 @@
+The content of this file is based on the online documentation that can be found
+at https://drupal.org/node/2226579
+
+Sets are a convenient way to organize your images. Currently only 'sets' allow
+for display as a slideshow with the Flickr module. To generate an album of
+images, besides photosets, tags can be used, in combination with a specific user
+(also from node author) or group. Tags have the advantage that they can be taken
+from the taxonomy terms attached to a node, to create dynamic, context sensitive
+albums.
+
+To use Flickr Sets in user profiles, configure a Flickr identifier specified on
+the user account at user/[uid]/edit. Of course some albums must be present on
+the correspondent Flickr account. If you want other users to see those sets,
+give them the permission "View Flickr photos on user profiles" at
+admin/people/permissions#module-flickr. After that, browse to
+www.yoursite.com/flickr/[uid]/sets.
+
+A photo (or video) can make part of more than one set, without the need of
+duplicating it. Just go to https://www.flickr.com/photos/organize, click 'Add to
+album' and drag your images into it.
+
+Once that's done you can display the set as a thumbnail gallery or a slideshow
+in:
+- the node body using Flickr Filter
+- a block using Flickr Block
+- a field using Flickr Field.
+
+Disabling the Flickr Sets submodule: What happens?
+==================================================
+Only the first image of a set will be displayed in some blocks, in the photoset
+filter tag and the Flickr photo field. Those will link to the set on Flickr when
+clicking on them.
+
+Flickr Blocks affected
+----------------------
+- User recent photosets
+- Recent photosets by user
+All the others are unaffected.
+
+Flickr Filter tags affected
+---------------------------
+Only photoset tags like [flickr-photoset:id=72157634563269642,size=t]
+are affected, but not for the sizes x and y (slideshow).
+
+Flickr Field affected
+---------------------
+The Flickr Field 'photo' is only affected for the 'Item Type': 'Photoset'.
+The Flickr Field 'photoset' always displays only the primary image (except for
+slideshows), thus is unaffected.
+
+Sets for photos from other Flickr users
+=======================================
+That is what a 'Gallery' is for. So, all the nice photos of other that you want
+in an embedded album, you put them in a gallery on Flickr. You can put the
+photos of different Flickr users in the same gallery, but don't put your own
+photos inside.
+
+If you always combine photos of the same users, including yourself, and you have
+their consent, consider creating a group on Flickr, for example for the website
+of the local hockey club. That way they can add photos themselves for which you
+can then create e.g. blog posts on the site, "Our victorious match on Easter".
+Flickr groups have many admin tools to manage and control them.
diff --git a/sets/README.txt b/sets/README.txt
deleted file mode 100644
index ad9a35c..0000000
--- a/sets/README.txt
+++ /dev/null
@@ -1,62 +0,0 @@
-The content of this file is based on the online documentation that can be found
-at https://drupal.org/node/2226579
-
-Sets are a convenient way to organize your images. Currently only 'sets' allow
-for display as a slideshow with the Flickr module. To generate an album of
-images, besides photosets, tags can be used, in combination with a specific user
-(also from node author) or group. Tags have the advantage that they can be taken
-from the taxonomy terms attached to a node, to create dynamic, context sensitive
-albums.
-
-To use Flickr Sets in user profiles, configure a Flickr identifier specified on
-the user account at user/[uid]/edit. Of course some albums must be present on
-the correspondent Flickr account. If you want other users to see those sets,
-give them the permission "View Flickr photos on user profiles" at
-admin/people/permissions#module-flickr. After that, browse to
-www.yoursite.com/flickr/[uid]/sets.
-
-A photo (or video) can make part of more than one set, without the need of
-duplicating it. Just go to https://www.flickr.com/photos/organize, click 'Add to
-album' and drag your images into it.
-
-Once that's done you can display the set as a thumbnail gallery or a slideshow
-in:
-- the node body using Flickr Filter
-- a block using Flickr Block
-- a field using Flickr Field.
-
-Disabling the Flickr Sets submodule: What happens?
-==================================================
-Only the first image of a set will be displayed in some blocks, in the photoset
-filter tag and the Flickr photo field. Those will link to the set on Flickr when
-clicking on them.
-
-Flickr Blocks affected
-----------------------
-- User recent photosets
-- Recent photosets by user
-All the others are unaffected.
-
-Flickr Filter tags affected
----------------------------
-Only photoset tags like [flickr-photoset:id=72157634563269642,size=t]
-are affected, but not for the sizes x and y (slideshow).
-
-Flickr Field affected
----------------------
-The Flickr Field 'photo' is only affected for the 'Item Type': 'Photoset'.
-The Flickr Field 'photoset' always displays only the primary image (except for
-slideshows), thus is unaffected.
-
-Sets for photos from other Flickr users
-=======================================
-That is what a 'Gallery' is for. So, all the nice photos of other that you want
-in an embedded album, you put them in a gallery on Flickr. You can put the
-photos of different Flickr users in the same gallery, but don't put your own
-photos inside.
-
-If you always combine photos of the same users, including yourself, and you have
-their consent, consider creating a group on Flickr, for example for the website
-of the local hockey club. That way they can add photos themselves for which you
-can then create e.g. blog posts on the site, "Our victorious match on Easter".
-Flickr groups have many admin tools to manage and control them.
diff --git a/sets/config/flickr_sets.settings.json b/sets/config/flickr_sets.settings.json
new file mode 100644
index 0000000..82e4657
--- /dev/null
+++ b/sets/config/flickr_sets.settings.json
@@ -0,0 +1,6 @@
+{
+  "_config_name": "flickr_sets.settings",
+  "flickr_sets_thumb_default_size": "s",
+  "flickr_sets_per_page": 8,
+  "flickr_sets_photos_per_set": 6
+}
diff --git a/sets/flickr_sets.admin.inc b/sets/flickr_sets.admin.inc
index f482bea..dd1af4c 100644
--- a/sets/flickr_sets.admin.inc
+++ b/sets/flickr_sets.admin.inc
@@ -20,13 +20,13 @@ function flickr_sets_form_flickr_admin_settings_alter(&$form, &$form_state) {
   $form['photoset_settings']['flickr_sets_thumb_default_size'] = array(
     '#type' => 'select',
     '#title' => t('Size for the photo representing a set'),
-    '#default_value' => variable_get('flickr_sets_thumb_default_size', 's'),
+    '#default_value' => config_get('flickr_sets.settings', 'flickr_sets_thumb_default_size'),
     '#options' => array(
       's' => t('s: 75 px square'),
       't' => t('t: 100 px on longest side'),
       'q' => t('q: 150 px square'),
       'm' => t('m: 240 px on longest side'),
-      'n' => t('n: 320 px on longest side (!)'),
+      'n' => t('n: 320 px on longest side'),
       '-' => t('-: 500 px on longest side'),
       'z' => t('z: 640 px on longest side'),
       'c' => t('c: 800 px on longest side (!)'),
@@ -38,7 +38,7 @@ function flickr_sets_form_flickr_admin_settings_alter(&$form, &$form_state) {
     '#type' => 'textfield',
     '#title' => t('Number of photosets per page'),
     '#required' => TRUE,
-    '#default_value' => variable_get('flickr_sets_per_page', 8),
+    '#default_value' => config_get('flickr_sets.settings', 'flickr_sets_per_page'),
     '#description' => t('How many photosets display on user profile pages at <em>flickr/%uid/sets</em>. Clear the cache on form submit.'),
     '#size' => 2,
     '#maxlength' => 2,
@@ -47,7 +47,7 @@ function flickr_sets_form_flickr_admin_settings_alter(&$form, &$form_state) {
     '#type' => 'textfield',
     '#title' => t('Number of photos per set'),
     '#required' => TRUE,
-    '#default_value' => variable_get('flickr_sets_photos_per_set', 6),
+    '#default_value' => config_get('flickr_sets.settings', 'flickr_sets_photos_per_set'),
     '#description' => t('How many photos display in a set on user profile pages at <em>flickr/%uid/sets/%nsid</em>. Clear the cache on form submit.'),
     '#size' => 2,
     '#maxlength' => 2,
diff --git a/sets/flickr_sets.info b/sets/flickr_sets.info
index 047be2a..6549f67 100644
--- a/sets/flickr_sets.info
+++ b/sets/flickr_sets.info
@@ -1,6 +1,7 @@
 name = Flickr Sets
 description = Adds photoset capability to the Flickr module.
-core = 7.x
+type = module
+backdrop = 1.x
 package = Flickr
 configure = admin/config/media/flickr
 dependencies[] = flickr
diff --git a/sets/flickr_sets.install b/sets/flickr_sets.install
index eef3f72..ef99cb3 100644
--- a/sets/flickr_sets.install
+++ b/sets/flickr_sets.install
@@ -1,14 +1,22 @@
 <?php
 /**
  * @file
- * The uninstall hook.
+ * Update hook.
  */
 
 /**
- * Implements hook_uninstall().
+ * Move flickr settings from variables to config.
  */
-function flickr_sets_uninstall() {
-  variable_del('flickr_sets_thumb_default_size');
-  variable_del('flickr_sets_per_page');
-  variable_del('flickr_sets_photos_per_set');
+function flickr_sets_update_1000() {
+  // Migrate variables to config.
+  $config = config('flickr_sets.settings');
+  $config->set('flickr_sets_thumb_default_size', update_variable_get('flickr_sets_thumb_default_size', 's'));
+  $config->set('flickr_sets_per_page', update_variable_get('flickr_sets_per_page', 8));
+  $config->set('flickr_sets_photos_per_set', update_variable_get('flickr_sets_photos_per_set', 6));
+  $config->save();
+
+  // Delete variables.
+  update_variable_del('flickr_sets_thumb_default_size');
+  update_variable_del('flickr_sets_per_page');
+  update_variable_del('flickr_sets_photos_per_set');
 }
diff --git a/sets/flickr_sets.module b/sets/flickr_sets.module
index 0076d3b..d547e44 100644
--- a/sets/flickr_sets.module
+++ b/sets/flickr_sets.module
@@ -8,14 +8,14 @@
   module_load_include('inc', 'flickr_sets', 'flickr_sets.admin');
 
 /**
- * Implements hook_help().
+ * Implements hook_config_info().
  */
-function flickr_sets_help($path, $arg) {
-  switch ($path) {
-    case 'admin/help#flickr_sets':
-      // Return a line-break version of the README.txt.
-      return _filter_autop(file_get_contents(dirname(__FILE__) . '/README.txt'));
-  }
+function flickr_sets_config_info() {
+  $prefixes['flickr_sets.settings'] = array(
+    'label' => t('Flickr Sets settings'),
+    'group' => t('Flickr'),
+  );
+  return $prefixes;
 }
 
 /**
@@ -54,7 +54,7 @@ function flickr_set_load($sid, $page = 1) {
       array(
         'photoset_id' => $sid,
         'page' => $page,
-        'per_page' => variable_get('flickr_photos_per_page', 20),
+        'per_page' => config_get('flickr.settings', 'flickr_photos_per_page'),
       )
     );
   }
@@ -82,10 +82,10 @@ function flickr_sets_photosets($account, $nsid = NULL) {
   // Set this to something else if you want multiple pagers.
   $element = 0;
   $pager_page_array[$element] = empty($_GET['page']) ? 0 : (int) $_GET['page'];
-  $per_page = variable_get('flickr_sets_per_page', 8);
+  $per_page = config_get('flickr_sets.settings', 'flickr_sets_per_page');
   // First we need the complete list of sets just for the pager info.
   $set_response = flickr_photosets_getlist($nsid);
-  $pager_total[$element] = ceil(count($set_response) / variable_get('flickr_sets_per_page', 8));
+  $pager_total[$element] = ceil(count($set_response) / config_get('flickr_sets.settings', 'flickr_sets_per_page'));
   $pager_total_items[$element] = count($set_response);
   // Now we only get the sets for the corresponding page.
   $set_response = flickr_photosets_getlist($nsid, $pager_page_array[$element] + 1);
@@ -127,7 +127,7 @@ function flickr_sets_photoset($account, $set) {
   // Set this to something else if you want multiple pagers.
   $element = 0;
   $pager_page_array[$element] = empty($_GET['page']) ? 0 : (int) $_GET['page'];
-  $per_page = variable_get('flickr_sets_photos_per_set', 6);
+  $per_page = config_get('flickr_sets.settings', 'flickr_sets_photos_per_set');
 
   // Request set of photos.
   $set_response = flickr_set_load($id, $pager_page_array[$element] + 1);
@@ -180,18 +180,18 @@ function theme_flickr_sets_photosets($variables) {
   $nsid = $variables['nsid'];
   $photosets = $variables['photosets'];
 
-  $output = theme('pager', array('quantity' => variable_get('flickr_sets_per_page', 8)));
+  $output = theme('pager', array('quantity' => config_get('flickr_sets.settings', 'flickr_sets_per_page')));
   $output .= "<div class='flickr-photosets'>\n";
   foreach ((array) $photosets as $photoset) {
     $output .= theme('flickr_sets_photoset_box', array(
       'photoset' => $photoset,
       'uid' => $uid,
       'nsid' => $nsid,
-      'size' => variable_get('flickr_sets_thumb_default_size', 's'),
+      'size' => config_get('flickr_sets.settings', 'flickr_sets_thumb_default_size'),
     ));
   }
   $output .= '</div>';
-  $output .= theme('pager', array('quantity' => variable_get('flickr_sets_per_page', 8)));
+  $output .= theme('pager', array('quantity' => config_get('flickr_sets.settings', 'flickr_sets_per_page')));
   return $output;
 }
 
@@ -203,9 +203,9 @@ function theme_flickr_sets_photoset($variables) {
   $per_page = $variables['per_page'];
   $photo_arr = $variables['photo_arr'];
   $set_info = $variables['set_info'];
-  $output = theme('pager', array('quantity' => variable_get('flickr_sets_photos_per_set', 6)));
+  $output = theme('pager', array('quantity' => config_get('flickr_sets.settings', 'flickr_sets_photos_per_set')));
   $output .= flickr_album('photoset', $set_info['id'], $per_page, NULL, 'photos', '', '', 101, 'unsorted', 'h1', NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL, NULL, $photo_arr['photoset']['page']);
-  $output .= theme('pager', array('quantity' => variable_get('flickr_photos_per_page', 6)));
+  $output .= theme('pager', array('quantity' => config_get('flickr.settings', 'flickr_photos_per_page')));
 
   return $output;
 }
diff --git a/style/README.md b/style/README.md
new file mode 100644
index 0000000..77773cc
--- /dev/null
+++ b/style/README.md
@@ -0,0 +1,63 @@
+The content of this file is based on the online documentation that can be found
+at https://www.drupal.org/node/2174131. It is recommended to read it there.
+
+Extra configuration options: Rounded corners, shadow, border, emphasize on
+hover.
+
+Configuration
+=============
+At 'admin/config/media/flickr' in the section 'STYLING (CSS RELATED)':
+
+Use flickr.css
+--------------
+Checkbox.
+Uncheck to take care of the styling yourself in custom CSS.
+If you use Flickr Filter, you might find the AutoFloat module useful
+(https://www.drupal.org/project/autofloat).
+
+Image styles
+------------
+Checkboxes.
+- Rounded corners
+- Shadow
+- Border
+
+Apply the image style also on the caption?
+------------------------------------------
+Radio buttons.
+- No
+- Yes, separate from the image
+- Yes, wrapped around the image and caption ("Polaroid" effect if applied with a
+  border)
+
+Disable the above styles on a caption with only the text 'Flickr' (simple link)
+-------------------------------------------------------------------------------
+Checkbox.
+
+Emphasize the image on hover?
+-----------------------------
+Radio buttons.
+- No
+- Enlarge slightly (includes the caption)
+- Enlarge (image only) (*)
+- Zoom (*)
+- Magnifier icon
+
+(*): The 'Zoom' and 'Enlarge' styles use bigger images to maintain the
+resolution. This has a slight performance impact and the size 'big square' (q)
+is not square but 150px on the longest side to avoid distortion on older
+browsers.
+
+
+Suppress Flickr block titles
+============================
+You can suppress the block titles with CSS. For example for the block 'Flickr: User photos with specific tags' ($delta=11), it would look like:
+
+#block-flickr-11 .flickr-album-heading {
+  display: none;
+}
+
+
+Image & album HTML structure
+============================
+See https://www.drupal.org/node/2289797.
diff --git a/style/README.txt b/style/README.txt
deleted file mode 100644
index 77773cc..0000000
--- a/style/README.txt
+++ /dev/null
@@ -1,63 +0,0 @@
-The content of this file is based on the online documentation that can be found
-at https://www.drupal.org/node/2174131. It is recommended to read it there.
-
-Extra configuration options: Rounded corners, shadow, border, emphasize on
-hover.
-
-Configuration
-=============
-At 'admin/config/media/flickr' in the section 'STYLING (CSS RELATED)':
-
-Use flickr.css
---------------
-Checkbox.
-Uncheck to take care of the styling yourself in custom CSS.
-If you use Flickr Filter, you might find the AutoFloat module useful
-(https://www.drupal.org/project/autofloat).
-
-Image styles
-------------
-Checkboxes.
-- Rounded corners
-- Shadow
-- Border
-
-Apply the image style also on the caption?
-------------------------------------------
-Radio buttons.
-- No
-- Yes, separate from the image
-- Yes, wrapped around the image and caption ("Polaroid" effect if applied with a
-  border)
-
-Disable the above styles on a caption with only the text 'Flickr' (simple link)
--------------------------------------------------------------------------------
-Checkbox.
-
-Emphasize the image on hover?
------------------------------
-Radio buttons.
-- No
-- Enlarge slightly (includes the caption)
-- Enlarge (image only) (*)
-- Zoom (*)
-- Magnifier icon
-
-(*): The 'Zoom' and 'Enlarge' styles use bigger images to maintain the
-resolution. This has a slight performance impact and the size 'big square' (q)
-is not square but 150px on the longest side to avoid distortion on older
-browsers.
-
-
-Suppress Flickr block titles
-============================
-You can suppress the block titles with CSS. For example for the block 'Flickr: User photos with specific tags' ($delta=11), it would look like:
-
-#block-flickr-11 .flickr-album-heading {
-  display: none;
-}
-
-
-Image & album HTML structure
-============================
-See https://www.drupal.org/node/2289797.
diff --git a/style/config/flickrstyle.settings.json b/style/config/flickrstyle.settings.json
new file mode 100644
index 0000000..09a23ce
--- /dev/null
+++ b/style/config/flickrstyle.settings.json
@@ -0,0 +1,11 @@
+{
+  "_config_name": "flickrstyle.settings",
+  "flickrstyle_styles": [
+    "rounded",
+    "shadow",
+    "border"
+  ],
+  "flickrstyle_caption": 1,
+  "flickrstyle_emphasize": 2,
+  "flickrstyle_nostyle": 1
+}
diff --git a/style/flickrstyle.admin.inc b/style/flickrstyle.admin.inc
index 750bf60..b5d307e 100644
--- a/style/flickrstyle.admin.inc
+++ b/style/flickrstyle.admin.inc
@@ -10,7 +10,7 @@
 function flickrstyle_form_flickr_admin_settings_alter(&$form, &$form_state) {
   $form['#validate'][] = 'flickrstyle_admin_settings_validate';
   // Do not display CSS styling options if the module's CSS is disabled.
-  if (variable_get('flickr_css', 1)) {
+  if (config_get('flickr.settings', 'flickr_css')) {
     $options = array(
       'rounded' => t('Rounded corners'),
       'shadow' => t('Shadow'),
@@ -19,23 +19,15 @@ function flickrstyle_form_flickr_admin_settings_alter(&$form, &$form_state) {
     $form['css_settings']['flickrstyle_styles'] = array(
       '#type' => 'checkboxes',
       '#title' => t('Image styles'),
-      '#default_value' => variable_get('flickrstyle_styles', array(
-        'rounded' => 'rounded',
-        'shadow' => 'shadow',
-        'border' => 'border',
-      )),
+      '#default_value' => config_get('flickrstyle.settings', 'flickrstyle_styles'),
       '#options' => $options,
       '#weight' => 8,
     );
-    $styles = variable_get('flickrstyle_styles', array(
-      'rounded' => 'rounded',
-      'shadow' => 'shadow',
-      'border' => 'border',
-    ));
+    $styles = config_get('flickrstyle.settings', 'flickrstyle_styles');
     // We need a shadow and/or border before we can use a style on the caption
     // and a reset to 'No' of it if so.
     if (gettype($styles['shadow']) == 'integer' && gettype($styles['border']) == 'integer') {
-      variable_set('flickrstyle_caption', 0);
+      config_set('flickrstyle.settings', 'flickrstyle_caption', 0);
       drupal_set_message(t("The caption style has been disabled until you set a 'border' and/or 'shadow' in the 'Image styles'. It will be available again after saving the form."), 'warning', FALSE);
     }
     $form['css_settings']['flickrstyle_caption'] = array(
@@ -47,7 +39,7 @@ function flickrstyle_form_flickr_admin_settings_alter(&$form, &$form_state) {
         t('Yes, wrapped around the image and caption ("Polaroid" effect if applied with a border)'),
       ),
       // Defaults to 'No'
-      '#default_value' => variable_get('flickrstyle_caption', 1),
+      '#default_value' => config_get('flickrstyle.settings', 'flickrstyle_caption'),
       '#weight' => 10,
     );
     // We need a shadow and/or border before we can use a style on the caption.
@@ -63,13 +55,13 @@ function flickrstyle_form_flickr_admin_settings_alter(&$form, &$form_state) {
     $form['css_settings']['flickrstyle_nostyle'] = array(
       '#type' => 'checkbox',
       '#title' => t("Disable the above styles on a caption with only the text 'Flickr' (simple link)"),
-      '#default_value' => variable_get('flickrstyle_nostyle', 1),
+      '#default_value' => config_get('flickrstyle.settings', 'flickrstyle_nostyle'),
       '#weight' => 11,
     );
     // Disable the 'Enlarge' style until a border is set or shadow unselected.
     if (gettype($styles['shadow']) != 'integer' && gettype($styles['border']) == 'integer') {
-      if (variable_get('flickrstyle_emphasize', 2) == 2) {
-        variable_set('flickrstyle_emphasize', 3);
+      if (config_get('flickrstyle.settings', 'flickrstyle_emphasize') == 2) {
+        config_set('flickrstyle.settings', 'flickrstyle_emphasize', 3);
         drupal_set_message(t("The emphasize style has been set to 'Zoom'. 'Enlarge' has been disabled until you set a 'border' or unselect 'shadow' in the 'Image styles'. It will be available again after saving the form."), 'warning', FALSE);
       }
     }
@@ -84,7 +76,7 @@ function flickrstyle_form_flickr_admin_settings_alter(&$form, &$form_state) {
         t('Magnifier icon'),
       ),
       // Defaults to 'Enlarge slightly'.
-      '#default_value' => variable_get('flickrstyle_emphasize', 2),
+      '#default_value' => config_get('flickrstyle.settings', 'flickrstyle_emphasize'),
       '#description' => t("(*): The 'Zoom' and 'Enlarge' styles use bigger images to maintain the resolution. This has a slight performance impact and the size 'big square' (q) is not square but 150px on the longest side to avoid distortion on older browsers."),
       '#weight' => 12,
     );
diff --git a/style/flickrstyle.info b/style/flickrstyle.info
index 4888137..854e802 100644
--- a/style/flickrstyle.info
+++ b/style/flickrstyle.info
@@ -1,6 +1,7 @@
 name = Flickr Style
 description = Extra configuration options: Rounded corners, shadow, border, emphasize on hover.
-core = 7.x
+type = module
+backdrop = 1.x
 package = Flickr
 configure = admin/config/media/flickr
 dependencies[] = flickr
diff --git a/style/flickrstyle.install b/style/flickrstyle.install
index 4a3b2ae..d5290e1 100644
--- a/style/flickrstyle.install
+++ b/style/flickrstyle.install
@@ -1,15 +1,28 @@
 <?php
 /**
  * @file
- * The Flickr Style uninstall hook
+ * The Flickr Style update hook
  */
 
 /**
- * Implements hook_uninstall().
+ * Move flickr settings from variables to config.
  */
-function flickrstyle_uninstall() {
-  variable_del('flickrstyle_styles');
-  variable_del('flickrstyle_caption');
-  variable_del('flickrstyle_emphasize');
-  variable_del('flickrstyle_nostyle');
+function flickrstyle_update_1000() {
+  // Migrate variables to config.
+  $config = config('flickr_style.settings');
+  $config->set('flickrstyle_styles', update_variable_get('flickrstyle_styles', array(
+      'rounded',
+      'shadow',
+      'border',
+    )));
+  $config->set('flickrstyle_caption', update_variable_get('flickrstyle_caption', 1));
+  $config->set('flickrstyle_emphasize', update_variable_get('flickrstyle_emphasize', 2));
+  $config->set('flickrstyle_nostyle', update_variable_get('flickrstyle_nostyle', 1));
+  $config->save();
+
+  // Delete variables.
+  update_variable_del('flickrstyle_styles');
+  update_variable_del('flickrstyle_caption');
+  update_variable_del('flickrstyle_emphasize');
+  update_variable_del('flickrstyle_nostyle');
 }
diff --git a/style/flickrstyle.module b/style/flickrstyle.module
index ef7198a..b7ff609 100644
--- a/style/flickrstyle.module
+++ b/style/flickrstyle.module
@@ -8,61 +8,57 @@
   module_load_include('inc', 'flickrstyle', 'flickrstyle.admin');
 
 /**
- * Implements hook_help().
+ * Implements hook_config_info().
  */
-function flickrstyle_help($path, $arg) {
-  switch ($path) {
-    case 'admin/help#flickrstyle':
-      // Return a line-break version of the README.txt.
-      return _filter_autop(file_get_contents(dirname(__FILE__) . '/README.txt'));
-  }
+function flickrstyle_config_info() {
+  $prefixes['flickrstyle.settings'] = array(
+    'label' => t('Flickr Style settings'),
+    'group' => t('Flickr'),
+  );
+  return $prefixes;
 }
 
 /**
- * Implements hook_page_build().
+ * Implements hook_init().
  */
-function flickrstyle_page_build(&$page) {
+function flickrstyle_init() {
   // Determine the settings which CSS files to use.
-  if (variable_get('flickr_css', 1)) {
-    $styles = variable_get('flickrstyle_styles', array(
-      'rounded' => 'rounded',
-      'shadow' => 'shadow',
-      'border' => 0,
-    ));
+  if (config_get('flickr.settings', 'flickr_css')) {
+    $styles = config_get('flickrstyle.settings', 'flickrstyle_styles');
     if (gettype($styles['rounded']) != 'integer') {
-      drupal_add_css(drupal_get_path('module', 'flickrstyle') . '/css/flickrstyle_rounded.css', array(
+      backdrop_add_css(backdrop_get_path('module', 'flickrstyle') . '/css/flickrstyle_rounded.css', array(
         'group' => CSS_DEFAULT,
         'every_page' => TRUE,
       ));
     }
     if (gettype($styles['shadow']) != 'integer') {
-      drupal_add_css(drupal_get_path('module', 'flickrstyle') . '/css/flickrstyle_shadow.css', array(
+      backdrop_add_css(backdrop_get_path('module', 'flickrstyle') . '/css/flickrstyle_shadow.css', array(
         'group' => CSS_DEFAULT,
         'every_page' => TRUE,
       ));
     }
     if (gettype($styles['border']) != 'integer' && gettype($styles['shadow']) != 'integer') {
-      drupal_add_css(drupal_get_path('module', 'flickrstyle') . '/css/flickrstyle_border.css', array(
+      backdrop_add_css(backdrop_get_path('module', 'flickrstyle') . '/css/flickrstyle_border.css', array(
         'group' => CSS_DEFAULT,
         'every_page' => TRUE,
       ));
     }
     elseif (gettype($styles['border']) != 'integer') {
-      drupal_add_css(drupal_get_path('module', 'flickrstyle') . '/css/flickrstyle_bordernoshadow.css', array(
+      backdrop_add_css(backdrop_get_path('module', 'flickrstyle') . '/css/flickrstyle_bordernoshadow.css', array(
         'group' => CSS_DEFAULT,
         'every_page' => TRUE,
       ));
     }
-    switch (variable_get('flickrstyle_caption', 1)) {
+    switch (config_get('flickrstyle.settings', 'flickrstyle_caption')) {
       case 1:
         if (gettype($styles['shadow']) != 'integer') {
-          drupal_add_css(drupal_get_path('module', 'flickrstyle') . '/css/flickrstyle_caption_shadow.css', array(
+          backdrop_add_css(backdrop_get_path('module', 'flickrstyle') . '/css/flickrstyle_caption_shadow.css', array(
             'group' => CSS_DEFAULT,
             'every_page' => TRUE,
           ));
         }
         else {
-          drupal_add_css(drupal_get_path('module', 'flickrstyle') . '/css/flickrstyle_caption_border.css', array(
+          backdrop_add_css(backdrop_get_path('module', 'flickrstyle') . '/css/flickrstyle_caption_border.css', array(
             'group' => CSS_DEFAULT,
             'every_page' => TRUE,
           ));
@@ -71,49 +67,49 @@ function flickrstyle_page_build(&$page) {
 
       case 2:
         if (gettype($styles['shadow']) != 'integer') {
-          drupal_add_css(drupal_get_path('module', 'flickrstyle') . '/css/flickrstyle_wrapcaption_shadow.css', array(
+          backdrop_add_css(backdrop_get_path('module', 'flickrstyle') . '/css/flickrstyle_wrapcaption_shadow.css', array(
             'group' => CSS_DEFAULT,
             'every_page' => TRUE,
           ));
         }
         else {
-          drupal_add_css(drupal_get_path('module', 'flickrstyle') . '/css/flickrstyle_wrapcaption_border.css', array(
+          backdrop_add_css(backdrop_get_path('module', 'flickrstyle') . '/css/flickrstyle_wrapcaption_border.css', array(
             'group' => CSS_DEFAULT,
             'every_page' => TRUE,
           ));
         }
         break;
     }
-    if (variable_get('flickrstyle_nostyle', 1)) {
-      drupal_add_css(drupal_get_path('module', 'flickrstyle') . '/css/flickrstyle_nostyle.css', array(
+    if (config_get('flickrstyle.settings', 'flickrstyle_nostyle')) {
+      backdrop_add_css(backdrop_get_path('module', 'flickrstyle') . '/css/flickrstyle_nostyle.css', array(
         'group' => CSS_DEFAULT,
         'every_page' => TRUE,
       ));
     }
-    switch (variable_get('flickrstyle_emphasize', 2)) {
+    switch (config_get('flickrstyle.settings', 'flickrstyle_emphasize')) {
       case 1:
-        drupal_add_css(drupal_get_path('module', 'flickrstyle') . '/css/flickrstyle_enlarge.css', array(
+        backdrop_add_css(backdrop_get_path('module', 'flickrstyle') . '/css/flickrstyle_enlarge.css', array(
           'group' => CSS_DEFAULT,
           'every_page' => TRUE,
         ));
         break;
 
       case 2:
-        drupal_add_css(drupal_get_path('module', 'flickrstyle') . '/css/flickrstyle_big.css', array(
+        backdrop_add_css(backdrop_get_path('module', 'flickrstyle') . '/css/flickrstyle_big.css', array(
           'group' => CSS_DEFAULT,
           'every_page' => TRUE,
         ));
         break;
 
       case 3:
-        drupal_add_css(drupal_get_path('module', 'flickrstyle') . '/css/flickrstyle_zoom.css', array(
+        backdrop_add_css(backdrop_get_path('module', 'flickrstyle') . '/css/flickrstyle_zoom.css', array(
           'group' => CSS_DEFAULT,
           'every_page' => TRUE,
         ));
         break;
 
       case 4:
-        drupal_add_css(drupal_get_path('module', 'flickrstyle') . '/css/flickrstyle_magnifier.css', array(
+        backdrop_add_css(backdrop_get_path('module', 'flickrstyle') . '/css/flickrstyle_magnifier.css', array(
           'group' => CSS_DEFAULT,
           'every_page' => TRUE,
         ));
diff --git a/tags/README.md b/tags/README.md
new file mode 100644
index 0000000..7693589
--- /dev/null
+++ b/tags/README.md
@@ -0,0 +1,3 @@
+- Returns a given user's tags cloud at *flickr/%user/tags/cloud*.
+- Returns a given user's tags in a list at *flickr/%user/tags/list*.
+- Returns a user's photos with given tags at *flickr/%user/tags/%*.
diff --git a/tags/config/flickr_tags.settings.json b/tags/config/flickr_tags.settings.json
new file mode 100644
index 0000000..55120d7
--- /dev/null
+++ b/tags/config/flickr_tags.settings.json
@@ -0,0 +1,4 @@
+{
+  "_config_name": "flickr_tags.settings",
+  "flickr_tags_in_cloud": 150
+}
diff --git a/tags/css/flickr_tags.css b/tags/css/flickr_tags.css
new file mode 100644
index 0000000..0653ddd
--- /dev/null
+++ b/tags/css/flickr_tags.css
@@ -0,0 +1,22 @@
+ul#flickr_taglist ul {
+  padding: 0;
+}
+
+ul#flickr_taglist ul li {
+  display: inline;
+  padding: 0;
+  margin: 0 1em 0 0;
+  background: transparent none no-repeat fixed top;
+}
+
+ul#flickr_tagcloud {
+  list-style: none;
+  line-height: normal;
+}
+
+ul#flickr_tagcloud li {
+  display: inline;
+  background: transparent none no-repeat fixed top;
+  padding: 0;
+  margin: 0 0.1em 0 0;
+}
diff --git a/tags/flickr_tags.admin.inc b/tags/flickr_tags.admin.inc
new file mode 100644
index 0000000..d99a6bb
--- /dev/null
+++ b/tags/flickr_tags.admin.inc
@@ -0,0 +1,39 @@
+<?php
+/**
+ * @file
+ * The admin settings for the Flickr Tags module.
+ */
+
+/**
+ * Implements hook_form_FORM_ID_alter().
+ */
+function flickr_tags_form_flickr_admin_settings_alter(&$form, &$form_state) {
+  $form['#validate'][] = 'flickr_tags_admin_settings_validate';
+  $form['tags_settings'] = array(
+    '#type' => 'fieldset',
+    '#title' => t('Tags options'),
+    '#collapsible' => TRUE,
+    '#collapsed' => TRUE,
+    '#weight' => 22,
+  );
+ $form['tags_settings']['flickr_tags_in_cloud'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Maximum number of tags in a tag cloud'),
+    '#required' => TRUE,
+    '#default_value' => config_get('flickr_tags.settings', 'flickr_tags_in_cloud'),
+    '#description' => t('Applies on the tag cloud on a user profile pages at <em>flickr/%uid/tags/cloud</em>.'),
+    '#size' => 3,
+    '#maxlength' => 3,
+  );
+}
+
+/**
+ * Validate user input.
+ */
+function flickr_tags_admin_settings_validate($form, &$form_state) {
+  $limit = trim($form_state['values']['flickr_tags_in_cloud']);
+  // Validate tags in cloud.
+  if (!is_numeric($limit) || $limit < 1) {
+    form_set_error('flickr_tags_in_cloud', t('Set a number from 1 to 999.'));
+  }
+}
diff --git a/tags/flickr_tags.css b/tags/flickr_tags.css
deleted file mode 100644
index 0653ddd..0000000
--- a/tags/flickr_tags.css
+++ /dev/null
@@ -1,22 +0,0 @@
-ul#flickr_taglist ul {
-  padding: 0;
-}
-
-ul#flickr_taglist ul li {
-  display: inline;
-  padding: 0;
-  margin: 0 1em 0 0;
-  background: transparent none no-repeat fixed top;
-}
-
-ul#flickr_tagcloud {
-  list-style: none;
-  line-height: normal;
-}
-
-ul#flickr_tagcloud li {
-  display: inline;
-  background: transparent none no-repeat fixed top;
-  padding: 0;
-  margin: 0 0.1em 0 0;
-}
diff --git a/tags/flickr_tags.info b/tags/flickr_tags.info
index 860bb12..ad4bc2a 100644
--- a/tags/flickr_tags.info
+++ b/tags/flickr_tags.info
@@ -1,5 +1,6 @@
 name = Flickr Tags
 description = Adds tags capability to Flickr module.
-core = 7.x
+type = module
+backdrop = 1.x
 package = Flickr
 dependencies[] = flickr
diff --git a/tags/flickr_tags.install b/tags/flickr_tags.install
new file mode 100644
index 0000000..81c338f
--- /dev/null
+++ b/tags/flickr_tags.install
@@ -0,0 +1,18 @@
+<?php
+/**
+ * @file
+ * Update hook.
+ */
+
+/**
+ * Move flickr settings from variables to config.
+ */
+function flickr_tags_update_1000() {
+  // Migrate variables to config.
+  $config = config('flickr_tags_in_cloud.settings');
+  $config->set('flickr_tags_in_cloud', update_variable_get('flickr_tags_in_cloud', 150));
+  $config->save();
+
+  // Delete variables.
+  update_variable_del('flickr_tags_in_cloud');
+}
diff --git a/tags/flickr_tags.module b/tags/flickr_tags.module
index 29e338b..8be95a4 100644
--- a/tags/flickr_tags.module
+++ b/tags/flickr_tags.module
@@ -4,6 +4,20 @@
  * The Flickr tags module.
  */
 
+  // Load flickr_tags.admin.inc from the flickr_sets module.
+  module_load_include('inc', 'flickr_tags', 'flickr_tags.admin');
+
+/**
+ * Implements hook_config_info().
+ */
+function flickr_tags_config_info() {
+  $prefixes['flickr_tags.settings'] = array(
+    'label' => t('Flickr Tags settings'),
+    'group' => t('Flickr'),
+  );
+  return $prefixes;
+}
+
 /**
  * Implements hook_menu().
  */
@@ -52,13 +66,13 @@ function flickr_tags_menu() {
  * Returns a given user's tags cloud.
  */
 function flickr_tags_cloud($account, $nsid = NULL) {
-  if (variable_get('flickr_css', 1)) {
-    drupal_add_css(drupal_get_path('module', 'flickr_tags') . '/flickr_tags.css');
+  if (config_get('flickr.settings', 'flickr_css')) {
+    backdrop_add_css(backdrop_get_path('module', 'flickr_tags') . '/css/flickr_tags.css');
   }
   drupal_set_title(t('Flickr tags cloud - @name', array('@name' => $account->name)));
   $nsid = $account->flickr['nsid'];
   // Get tag info.
-  $poptag_response = flickr_tags_getlistuserpopular($nsid, variable_get('flickr_tags_in_cloud', 150));
+  $poptag_response = flickr_tags_getlistuserpopular($nsid, config_get('flickr_tags.settings', 'flickr_tags_in_cloud'));
 
   if ($poptag_response === FALSE) {
     drupal_set_message(t("Error retrieving %user's tags from Flickr", array('%user' => $account->name)));
@@ -85,8 +99,8 @@ function flickr_tags_cloud($account, $nsid = NULL) {
  * Returns a given user's tags.
  */
 function flickr_tags_list($account, $nsid = NULL) {
-  if (variable_get('flickr_css', 1)) {
-    drupal_add_css(drupal_get_path('module', 'flickr_tags') . '/flickr_tags.css');
+  if (config_get('flickr.settings', 'flickr_css')) {
+    backdrop_add_css(backdrop_get_path('module', 'flickr_tags') . '/css/flickr_tags.css');
   }
   drupal_set_title(t('Flickr tags list - @name', array('@name' => $account->name)));
   $nsid = $account->flickr['nsid'];
-- 
1.7.9.5

