diff --git a/AUTHORS.rst b/AUTHORS.rst
index 09205bc266811630dc031d2aa2bf82f69ba12792..014e950e9c28bfbb6d13ec2446d5f9636bfdef51 100644
--- a/AUTHORS.rst
+++ b/AUTHORS.rst
@@ -1,24 +1,35 @@
 .. vim: set fileencoding=utf-8 :
 
-.. Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/          ..
+.. Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/          ..
 .. Contact: beat.support@idiap.ch                                             ..
 ..                                                                            ..
-.. This file is part of the beat.web module of the BEAT platform.             ..
+.. This file is part of the beat.backend.python module of the BEAT platform.  ..
 ..                                                                            ..
-.. Commercial License Usage                                                   ..
-.. Licensees holding valid commercial BEAT licenses may use this file in      ..
-.. accordance with the terms contained in a written agreement between you     ..
-.. and Idiap. For further information contact tto@idiap.ch                    ..
-..                                                                            ..
-.. Alternatively, this file may be used under the terms of the GNU Affero     ..
-.. Public License version 3 as published by the Free Software and appearing   ..
-.. in the file LICENSE.AGPL included in the packaging of this file.           ..
-.. The BEAT platform 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.                                       ..
-..                                                                            ..
-.. You should have received a copy of the GNU Affero Public License along     ..
-.. with the BEAT platform. If not, see http://www.gnu.org/licenses/.          ..
+.. Redistribution and use in source and binary forms, with or without
+.. modification, are permitted provided that the following conditions are met:
+
+.. 1. Redistributions of source code must retain the above copyright notice, this
+.. list of conditions and the following disclaimer.
+
+.. 2. Redistributions in binary form must reproduce the above copyright notice,
+.. this list of conditions and the following disclaimer in the documentation
+.. and/or other materials provided with the distribution.
+
+.. 3. Neither the name of the copyright holder nor the names of its contributors
+.. may be used to endorse or promote products derived from this software without
+.. specific prior written permission.
+
+.. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+.. ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+.. WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+.. DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+.. FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.. DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+.. SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+.. CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+.. OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+.. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
 
 ===========================================================
  Authors of the Biometrics Evaluation and Testing Platform
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..97885cfc27d93c8ffe557846df98c98e32fb9ddb
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,27 @@
+Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/
+Contact: beat.support@idiap.ch
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice, this
+list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright notice,
+this list of conditions and the following disclaimer in the documentation
+and/or other materials provided with the distribution.
+
+3. Neither the name of the copyright holder nor the names of its contributors
+may be used to endorse or promote products derived from this software without
+specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/LICENSE.AGPL b/LICENSE.AGPL
deleted file mode 100644
index dba13ed2ddf783ee8118c6a581dbf75305f816a3..0000000000000000000000000000000000000000
--- a/LICENSE.AGPL
+++ /dev/null
@@ -1,661 +0,0 @@
-                    GNU AFFERO GENERAL PUBLIC LICENSE
-                       Version 3, 19 November 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-                            Preamble
-
-  The GNU Affero General Public License is a free, copyleft license for
-software and other kinds of works, specifically designed to ensure
-cooperation with the community in the case of network server software.
-
-  The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works.  By contrast,
-our General Public Licenses are intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users.
-
-  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
-them 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.
-
-  Developers that use our General Public Licenses protect your rights
-with two steps: (1) assert copyright on the software, and (2) offer
-you this License which gives you legal permission to copy, distribute
-and/or modify the software.
-
-  A secondary benefit of defending all users' freedom is that
-improvements made in alternate versions of the program, if they
-receive widespread use, become available for other developers to
-incorporate.  Many developers of free software are heartened and
-encouraged by the resulting cooperation.  However, in the case of
-software used on network servers, this result may fail to come about.
-The GNU General Public License permits making a modified version and
-letting the public access it on a server without ever releasing its
-source code to the public.
-
-  The GNU Affero General Public License is designed specifically to
-ensure that, in such cases, the modified source code becomes available
-to the community.  It requires the operator of a network server to
-provide the source code of the modified version running there to the
-users of that server.  Therefore, public use of a modified version, on
-a publicly accessible server, gives the public access to the source
-code of the modified version.
-
-  An older license, called the Affero General Public License and
-published by Affero, was designed to accomplish similar goals.  This is
-a different license, not a version of the Affero GPL, but Affero has
-released a new version of the Affero GPL which permits relicensing under
-this license.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.
-
-                       TERMS AND CONDITIONS
-
-  0. Definitions.
-
-  "This License" refers to version 3 of the GNU Affero General Public License.
-
-  "Copyright" also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.
-
-  "The Program" refers to any copyrightable work licensed under this
-License.  Each licensee is addressed as "you".  "Licensees" and
-"recipients" may be individuals or organizations.
-
-  To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy.  The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
-  A "covered work" means either the unmodified Program or a work based
-on the Program.
-
-  To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy.  Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
-  To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies.  Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
-  An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License.  If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
-  1. Source Code.
-
-  The "source code" for a work means the preferred form of the work
-for making modifications to it.  "Object code" means any non-source
-form of a work.
-
-  A "Standard Interface" means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
-  The "System Libraries" of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form.  A
-"Major Component", in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
-  The "Corresponding Source" for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities.  However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work.  For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
-  The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.
-
-  The Corresponding Source for a work in source code form is that
-same work.
-
-  2. Basic Permissions.
-
-  All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met.  This License explicitly affirms your unlimited
-permission to run the unmodified Program.  The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work.  This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
-  You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force.  You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright.  Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.
-
-  Conveying under any other circumstances is permitted solely under
-the conditions stated below.  Sublicensing is not allowed; section 10
-makes it unnecessary.
-
-  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
-  No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
-  When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.
-
-  4. Conveying Verbatim Copies.
-
-  You may convey 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;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
-  You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
-  5. Conveying Modified Source Versions.
-
-  You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:
-
-    a) The work must carry prominent notices stating that you modified
-    it, and giving a relevant date.
-
-    b) The work must carry prominent notices stating that it is
-    released under this License and any conditions added under section
-    7.  This requirement modifies the requirement in section 4 to
-    "keep intact all notices".
-
-    c) You must license the entire work, as a whole, under this
-    License to anyone who comes into possession of a copy.  This
-    License will therefore apply, along with any applicable section 7
-    additional terms, to the whole of the work, and all its parts,
-    regardless of how they are packaged.  This License gives no
-    permission to license the work in any other way, but it does not
-    invalidate such permission if you have separately received it.
-
-    d) If the work has interactive user interfaces, each must display
-    Appropriate Legal Notices; however, if the Program has interactive
-    interfaces that do not display Appropriate Legal Notices, your
-    work need not make them do so.
-
-  A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-"aggregate" if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit.  Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
-  6. Conveying Non-Source Forms.
-
-  You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:
-
-    a) Convey the object code in, or embodied in, a physical product
-    (including a physical distribution medium), accompanied by the
-    Corresponding Source fixed on a durable physical medium
-    customarily used for software interchange.
-
-    b) Convey the object code in, or embodied in, a physical product
-    (including a physical distribution medium), accompanied by a
-    written offer, valid for at least three years and valid for as
-    long as you offer spare parts or customer support for that product
-    model, to give anyone who possesses the object code either (1) a
-    copy of the Corresponding Source for all the software in the
-    product that is covered by this License, on a durable physical
-    medium customarily used for software interchange, for a price no
-    more than your reasonable cost of physically performing this
-    conveying of source, or (2) access to copy the
-    Corresponding Source from a network server at no charge.
-
-    c) Convey individual copies of the object code with a copy of the
-    written offer to provide the Corresponding Source.  This
-    alternative is allowed only occasionally and noncommercially, and
-    only if you received the object code with such an offer, in accord
-    with subsection 6b.
-
-    d) Convey the object code by offering access from a designated
-    place (gratis or for a charge), and offer equivalent access to the
-    Corresponding Source in the same way through the same place at no
-    further charge.  You need not require recipients to copy the
-    Corresponding Source along with the object code.  If the place to
-    copy the object code is a network server, the Corresponding Source
-    may be on a different server (operated by you or a third party)
-    that supports equivalent copying facilities, provided you maintain
-    clear directions next to the object code saying where to find the
-    Corresponding Source.  Regardless of what server hosts the
-    Corresponding Source, you remain obligated to ensure that it is
-    available for as long as needed to satisfy these requirements.
-
-    e) Convey the object code using peer-to-peer transmission, provided
-    you inform other peers where the object code and Corresponding
-    Source of the work are being offered to the general public at no
-    charge under subsection 6d.
-
-  A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
-  A "User Product" is either (1) a "consumer product", which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling.  In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage.  For a particular
-product received by a particular user, "normally used" refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product.  A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.
-
-  "Installation Information" for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source.  The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.
-
-  If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information.  But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
-  The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed.  Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.
-
-  Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
-  7. Additional Terms.
-
-  "Additional permissions" are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law.  If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
-  When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it.  (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.)  You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
-  Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:
-
-    a) Disclaiming warranty or limiting liability differently from the
-    terms of sections 15 and 16 of this License; or
-
-    b) Requiring preservation of specified reasonable legal notices or
-    author attributions in that material or in the Appropriate Legal
-    Notices displayed by works containing it; or
-
-    c) Prohibiting misrepresentation of the origin of that material, or
-    requiring that modified versions of such material be marked in
-    reasonable ways as different from the original version; or
-
-    d) Limiting the use for publicity purposes of names of licensors or
-    authors of the material; or
-
-    e) Declining to grant rights under trademark law for use of some
-    trade names, trademarks, or service marks; or
-
-    f) Requiring indemnification of licensors and authors of that
-    material by anyone who conveys the material (or modified versions of
-    it) with contractual assumptions of liability to the recipient, for
-    any liability that these contractual assumptions directly impose on
-    those licensors and authors.
-
-  All other non-permissive additional terms are considered "further
-restrictions" within the meaning of section 10.  If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term.  If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
-  If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
-  Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.
-
-  8. Termination.
-
-  You may not propagate or modify a covered work except as expressly
-provided under this License.  Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
-  However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.
-
-  Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
-  Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License.  If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
-  9. Acceptance Not Required for Having Copies.
-
-  You are not required to accept this License in order to receive or
-run a copy of the Program.  Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance.  However,
-nothing other than this License grants you permission to propagate or
-modify any covered work.  These actions infringe copyright if you do
-not accept this License.  Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
-  10. Automatic Licensing of Downstream Recipients.
-
-  Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License.  You are not responsible
-for enforcing compliance by third parties with this License.
-
-  An "entity transaction" is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations.  If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.
-
-  You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License.  For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.
-
-  11. Patents.
-
-  A "contributor" is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based.  The
-work thus licensed is called the contributor's "contributor version".
-
-  A contributor's "essential patent claims" are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version.  For
-purposes of this definition, "control" includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
-this License.
-
-  Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.
-
-  In the following three paragraphs, a "patent license" is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement).  To "grant" such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.
-
-  If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients.  "Knowingly relying" means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.
-
-  If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.
-
-  A patent license is "discriminatory" if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License.  You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.
-
-  Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.
-
-  12. No Surrender of Others' Freedom.
-
-  If 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 convey a
-covered work so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you may
-not convey it at all.  For example, if you agree to terms that obligate you
-to collect a royalty for further conveying from those to whom you convey
-the Program, the only way you could satisfy both those terms and this
-License would be to refrain entirely from conveying the Program.
-
-  13. Remote Network Interaction; Use with the GNU General Public License.
-
-  Notwithstanding any other provision of this License, if you modify the
-Program, your modified version must prominently offer all users
-interacting with it remotely through a computer network (if your version
-supports such interaction) an opportunity to receive the Corresponding
-Source of your version by providing access to the Corresponding Source
-from a network server at no charge, through some standard or customary
-means of facilitating copying of software.  This Corresponding Source
-shall include the Corresponding Source for any work covered by version 3
-of the GNU General Public License that is incorporated pursuant to the
-following paragraph.
-
-  Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU General Public License into a single
-combined work, and to convey the resulting work.  The terms of this
-License will continue to apply to the part which is the covered work,
-but the work with which it is combined will remain governed by version
-3 of the GNU General Public License.
-
-  14. Revised Versions of this License.
-
-  The Free Software Foundation may publish revised and/or new versions of
-the GNU Affero 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 that a certain numbered version of the GNU Affero General
-Public License "or any later version" applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation.  If the Program does not specify a version number of the
-GNU Affero General Public License, you may choose any version ever published
-by the Free Software Foundation.
-
-  If the Program specifies that a proxy can decide which future
-versions of the GNU Affero General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.
-
-  Later license versions may give you additional or different
-permissions.  However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.
-
-  15. Disclaimer of Warranty.
-
-  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.
-
-  16. Limitation of Liability.
-
-  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
-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.
-
-  17. Interpretation of Sections 15 and 16.
-
-  If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.
-
-                     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
-state 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 Affero General Public License as published by
-    the Free Software Foundation, either version 3 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 Affero General Public License for more details.
-
-    You should have received a copy of the GNU Affero General Public License
-    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-Also add information on how to contact you by electronic and paper mail.
-
-  If your software can interact with users remotely through a computer
-network, you should also make sure that it provides a way for users to
-get its source.  For example, if your program is a web application, its
-interface could display a "Source" link that leads users to an archive
-of the code.  There are many ways you could offer source, and different
-solutions will be better for different programs; see section 13 for the
-specific requirements.
-
-  You should also get your employer (if you work as a programmer) or school,
-if any, to sign a "copyright disclaimer" for the program, if necessary.
-For more information on this, and how to apply and follow the GNU AGPL, see
-<http://www.gnu.org/licenses/>.
diff --git a/MANIFEST.in b/MANIFEST.in
index da7dac5ee116eb9bbec82f6adc8baa7ad9299f58..e6667a85885bad4e986a104e8f4a8a2d6977f264 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,4 +1,4 @@
-include LICENSE.AGPL README.rst version.txt requirements.txt
+include LICENSE README.rst version.txt requirements.txt
 include buildout.cfg develop.cfg
 recursive-include scripts *.sh
 recursive-include doc conf.py *.rst *.png *.svg *.ico *.odg *.pdf *.dot
diff --git a/README.rst b/README.rst
index 6e8905f1e6b46770b4b2bdd248ad086bdfc9ab21..63ad67fedc807d5730757d2198e114380e0728b2 100644
--- a/README.rst
+++ b/README.rst
@@ -1,24 +1,35 @@
 .. vim: set fileencoding=utf-8 :
 
-.. Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/          ..
+.. Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/          ..
 .. Contact: beat.support@idiap.ch                                             ..
 ..                                                                            ..
-.. This file is part of the beat.core module of the BEAT platform.            ..
+.. This file is part of the beat.backend.python module of the BEAT platform.  ..
 ..                                                                            ..
-.. Commercial License Usage                                                   ..
-.. Licensees holding valid commercial BEAT licenses may use this file in      ..
-.. accordance with the terms contained in a written agreement between you     ..
-.. and Idiap. For further information contact tto@idiap.ch                    ..
-..                                                                            ..
-.. Alternatively, this file may be used under the terms of the GNU Affero     ..
-.. Public License version 3 as published by the Free Software and appearing   ..
-.. in the file LICENSE.AGPL included in the packaging of this file.           ..
-.. The BEAT platform 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.                                       ..
-..                                                                            ..
-.. You should have received a copy of the GNU Affero Public License along     ..
-.. with the BEAT platform. If not, see http://www.gnu.org/licenses/.          ..
+.. Redistribution and use in source and binary forms, with or without
+.. modification, are permitted provided that the following conditions are met:
+
+.. 1. Redistributions of source code must retain the above copyright notice, this
+.. list of conditions and the following disclaimer.
+
+.. 2. Redistributions in binary form must reproduce the above copyright notice,
+.. this list of conditions and the following disclaimer in the documentation
+.. and/or other materials provided with the distribution.
+
+.. 3. Neither the name of the copyright holder nor the names of its contributors
+.. may be used to endorse or promote products derived from this software without
+.. specific prior written permission.
+
+.. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+.. ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+.. WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+.. DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+.. FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.. DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+.. SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+.. CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+.. OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+.. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
 
 .. image:: https://img.shields.io/badge/docs-stable-yellow.svg
    :target: https://www.idiap.ch/software/beat/docs/beat/beat.core/stable/index.html
diff --git a/beat/__init__.py b/beat/__init__.py
index 55692685f6e77a0621e619a1005296bb7fe031b9..20547d6fa1705cafedc7ea3b85ab90d13d172648 100644
--- a/beat/__init__.py
+++ b/beat/__init__.py
@@ -1,30 +1,40 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
+
 
 # see https://docs.python.org/3/library/pkgutil.html
 from pkgutil import extend_path
+
 __path__ = extend_path(__path__, __name__)
diff --git a/beat/core/__init__.py b/beat/core/__init__.py
index 577f4bdff1e98a61a7d51431927c385dafcf7550..efef23729349d56efc0ccf4256cfb7ef5678e0b4 100644
--- a/beat/core/__init__.py
+++ b/beat/core/__init__.py
@@ -1,26 +1,34 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
diff --git a/beat/core/algorithm.py b/beat/core/algorithm.py
index 4e681093b3d62a697a6d9863ec4a3d5436509b2b..30680348343f0399a088998b0ec1ac878c9d5b93 100644
--- a/beat/core/algorithm.py
+++ b/beat/core/algorithm.py
@@ -1,29 +1,38 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
+
 
 """
 =========
diff --git a/beat/core/baseformat.py b/beat/core/baseformat.py
index 561f4ae3d1d2718831eb25dad1d309c87872853e..37b11a77ba283b7290d53a93a73947b5c48d77a1 100644
--- a/beat/core/baseformat.py
+++ b/beat/core/baseformat.py
@@ -1,29 +1,38 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
+
 
 """
 ==========
diff --git a/beat/core/bcp/broker.py b/beat/core/bcp/broker.py
index fa1c9a23b73eac0967969ad1b127c81ecf55d328..e913cdb7b6f4097384d0d78226bc1c693869c466 100644
--- a/beat/core/bcp/broker.py
+++ b/beat/core/bcp/broker.py
@@ -1,29 +1,38 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
+
 
 """Starts the worker process (%(version)s)
 
diff --git a/beat/core/bcp/worker.py b/beat/core/bcp/worker.py
index 0b53c7562cace5407e803db6a175f2fe9a397aff..02bd5202675b7cb4e3418fce16e820dd6bc016e5 100644
--- a/beat/core/bcp/worker.py
+++ b/beat/core/bcp/worker.py
@@ -1,29 +1,38 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
+
 
 """Starts the worker process (%(version)s)
 
diff --git a/beat/core/bcpapi/BCP.py b/beat/core/bcpapi/BCP.py
index bc3e34cee4a1465c073439043a95c42e08382f5a..123f550064e1783daa2d757be1c89b8a7a074eaf 100644
--- a/beat/core/bcpapi/BCP.py
+++ b/beat/core/bcpapi/BCP.py
@@ -1,28 +1,36 @@
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
 
 
 """BEAT Computation Protocol definitions"""
diff --git a/beat/core/bcpapi/broker.py b/beat/core/bcpapi/broker.py
index fa0e28865537f97d0dd63695cc8f3e9ed64b63cd..43bb02a694b12b20cf8668f9c39cf600198c4da6 100644
--- a/beat/core/bcpapi/broker.py
+++ b/beat/core/bcpapi/broker.py
@@ -1,28 +1,36 @@
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
 
 
 """BEAT Computation broker
diff --git a/beat/core/bcpapi/client.py b/beat/core/bcpapi/client.py
index 403070093340b2bd2b698c6961f3cb62a787f532..96e17eb2faec9ec0ba7cfcae4b685ce88a98e007 100644
--- a/beat/core/bcpapi/client.py
+++ b/beat/core/bcpapi/client.py
@@ -1,28 +1,36 @@
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
 
 
 """BEAT Computation client
diff --git a/beat/core/bcpapi/execution.py b/beat/core/bcpapi/execution.py
index d99473edb045956f67b0afdf0a894edfd18070cc..774f310afb00e5a9bcc047cd72848cc97767fd84 100644
--- a/beat/core/bcpapi/execution.py
+++ b/beat/core/bcpapi/execution.py
@@ -1,28 +1,36 @@
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
 
 
 """
diff --git a/beat/core/bcpapi/processor.py b/beat/core/bcpapi/processor.py
index d5a5129ca523577a6f2edaff71c7fa18009c0ef6..236699973cf452aaa92886cc1cc5d0efba62ecc8 100644
--- a/beat/core/bcpapi/processor.py
+++ b/beat/core/bcpapi/processor.py
@@ -1,28 +1,36 @@
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
 
 
 """BEAT Computation worker"""
diff --git a/beat/core/bcpapi/worker.py b/beat/core/bcpapi/worker.py
index 90e7c06af47cbc7339d7079872b6ae38013765e9..aac30f789535e5671a68a0aeaa7fd1ecb3d18229 100644
--- a/beat/core/bcpapi/worker.py
+++ b/beat/core/bcpapi/worker.py
@@ -1,28 +1,36 @@
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
 
 
 """BEAT Computation worker"""
diff --git a/beat/core/bcpapi/zhelpers.py b/beat/core/bcpapi/zhelpers.py
index e6a8d9988a5ef406672d623eaeae8a4069a9bbb7..d58dbaac4aaa4fbf54eb00719bcef9fb86c2aadb 100644
--- a/beat/core/bcpapi/zhelpers.py
+++ b/beat/core/bcpapi/zhelpers.py
@@ -1,28 +1,37 @@
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
+
 
 """
 Helper module for common zmq task
diff --git a/beat/core/data.py b/beat/core/data.py
index 3fbc254761c205b26e79d9d3811e02692b901534..f929f802fcc141c9434dec644b7f1512540cb538 100644
--- a/beat/core/data.py
+++ b/beat/core/data.py
@@ -1,29 +1,38 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
+
 
 """
 ====
diff --git a/beat/core/data_loaders.py b/beat/core/data_loaders.py
index a726fc514412ef6f2f88c0394b1000145ac115a0..eabf4f6b4c542e25c8215bbe75f17d390c9ccc00 100644
--- a/beat/core/data_loaders.py
+++ b/beat/core/data_loaders.py
@@ -1,29 +1,38 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2017 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
+
 
 """
 ============
diff --git a/beat/core/database.py b/beat/core/database.py
index 50a7d0751c0b66b9e55598fb0bab76a076c19a9f..2c200742a20d88cd0b5a8173cc40e77ffc9ef6d0 100644
--- a/beat/core/database.py
+++ b/beat/core/database.py
@@ -1,29 +1,37 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
 
 
 """
@@ -94,7 +102,6 @@ class Database(BackendDatabase):
     def __init__(self, prefix, data, dataformat_cache=None):
         super(Database, self).__init__(prefix, data, dataformat_cache)
 
-
     def _load(self, data, dataformat_cache):
         """Loads the database"""
 
@@ -113,62 +120,61 @@ class Database(BackendDatabase):
             self.storage = Storage(self.prefix, self._name)
             data = self.storage.json.path
             if not self.storage.json.exists():
-                self.errors.append('Database declaration file not found: %s' % data)
+                self.errors.append("Database declaration file not found: %s" % data)
                 return
 
-
         # this runs basic validation, including JSON loading if required
-        self.data, self.errors = schema.validate('database', data)
-        if self.errors: return  # don't proceed with the rest of validation
+        self.data, self.errors = schema.validate("database", data)
+        if self.errors:
+            return  # don't proceed with the rest of validation
 
         if self.storage is not None:  # loading from the disk, check code
             if not self.storage.code.exists():
-                self.errors.append('Database view code not found: %s' % \
-                        self.storage.code.path)
+                self.errors.append(
+                    "Database view code not found: %s" % self.storage.code.path
+                )
                 return
             else:
                 code = self.storage.code.load()
 
-
         # At this point, `code' can be a string (or a binary blob) or ``None``
         if code is None:  # loads the default code for an algorithm
-            self.code = prototypes.binary_load('view.py')
+            self.code = prototypes.binary_load("view.py")
 
-        else: # just assign it - notice that in this case, no language is set
+        else:  # just assign it - notice that in this case, no language is set
             self.code = code
 
-
-        if self.errors: return  # don't proceed with the rest of validation
+        if self.errors:
+            return  # don't proceed with the rest of validation
 
         self._validate_semantics(dataformat_cache)
 
-
     def _validate_semantics(self, dataformat_cache):
         """Validates all sematical aspects of the database"""
 
         # all protocol names must be unique
-        protocol_names = [k['name'] for k in self.data['protocols']]
+        protocol_names = [k["name"] for k in self.data["protocols"]]
         if len(protocol_names) != len(set(protocol_names)):
             self.errors.append(
-                    "found different protocols with the same name: %s" % \
-                            (protocol_names,)
-                            )
+                "found different protocols with the same name: %s" % (protocol_names,)
+            )
 
         # all set names within a protocol must be unique
-        for protocol in self.data['protocols']:
-            set_names = [k['name'] for k in protocol['sets']]
+        for protocol in self.data["protocols"]:
+            set_names = [k["name"] for k in protocol["sets"]]
             if len(set_names) != len(set(set_names)):
                 self.errors.append(
-                        "found different sets with the same name at protocol " \
-                                "`%s': %s" % (protocol['name'], set_names),
-                                )
+                    "found different sets with the same name at protocol "
+                    "`%s': %s" % (protocol["name"], set_names)
+                )
 
             # all outputs must have valid data types
-            for _set in protocol['sets']:
+            for _set in protocol["sets"]:
 
-                for key, value in _set['outputs'].items():
+                for key, value in _set["outputs"].items():
 
-                    if value in self.dataformats: continue
+                    if value in self.dataformats:
+                        continue
 
                     if value in dataformat_cache:  # re-use
                         dataformat = dataformat_cache[value]
@@ -179,16 +185,23 @@ class Database(BackendDatabase):
                     self.dataformats[value] = dataformat
 
                     if dataformat.errors:
-                        self.errors.append("found error validating data format `%s' " \
-                                "for output `%s' on set `%s' of protocol `%s': %s" % \
-                                (value, key, _set['name'], protocol['name'],
-                                    "\n".join(dataformat.errors))
-                                )
+                        self.errors.append(
+                            "found error validating data format `%s' "
+                            "for output `%s' on set `%s' of protocol `%s': %s"
+                            % (
+                                value,
+                                key,
+                                _set["name"],
+                                protocol["name"],
+                                "\n".join(dataformat.errors),
+                            )
+                        )
 
                 # all view names must be relative to the database root path
-                if _set['view'].find('.') != -1 or _set['view'].find(os.sep) != -1:
-                    self.errors.append("dataset views are required to sit inside the " \
-                            "database root folder, but `%s' is either in a " \
-                            "subdirectory or points to a python module, what is " \
-                            "unsupported by this version" % (_set['view'],)
-                            )
+                if _set["view"].find(".") != -1 or _set["view"].find(os.sep) != -1:
+                    self.errors.append(
+                        "dataset views are required to sit inside the "
+                        "database root folder, but `%s' is either in a "
+                        "subdirectory or points to a python module, what is "
+                        "unsupported by this version" % (_set["view"],)
+                    )
diff --git a/beat/core/dataformat.py b/beat/core/dataformat.py
index 3906feeab4483ab005d12e7addacc21c9d728efa..e599593855ba024e5faf9f9359a3435d561333bc 100644
--- a/beat/core/dataformat.py
+++ b/beat/core/dataformat.py
@@ -1,29 +1,37 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
 
 
 """
@@ -52,7 +60,6 @@ from beat.backend.python.dataformat import Storage
 from beat.backend.python.dataformat import DataFormat as BackendDataFormat
 
 
-
 class DataFormat(BackendDataFormat):
     """Data formats define the chunks of data that circulate between blocks.
 
@@ -112,7 +119,6 @@ class DataFormat(BackendDataFormat):
     def __init__(self, prefix, data, parent=None, dataformat_cache=None):
         super(DataFormat, self).__init__(prefix, data, parent, dataformat_cache)
 
-
     def _load(self, data, dataformat_cache):
         """Loads the dataformat"""
 
@@ -123,14 +129,14 @@ class DataFormat(BackendDataFormat):
         self.errors = []
         self.data = None
 
-        if data is None: #loads prototype and validates it
+        if data is None:  # loads prototype and validates it
 
-            self.data, self.errors = prototypes.load('dataformat')
+            self.data, self.errors = prototypes.load("dataformat")
             assert not self.errors, "\n  * %s" % "\n  *".join(self.errors)
 
         else:
 
-            if not isinstance(data, dict): #user has passed a file pointer
+            if not isinstance(data, dict):  # user has passed a file pointer
                 # make sure to log this into the cache (avoids recursion)
                 dataformat_cache[data] = None
 
@@ -138,51 +144,59 @@ class DataFormat(BackendDataFormat):
                 self.storage = Storage(self.prefix, data)
                 data = self.storage.json.path
                 if not self.storage.exists():
-                    self.errors.append('Dataformat declaration file not found: %s' % data)
+                    self.errors.append(
+                        "Dataformat declaration file not found: %s" % data
+                    )
                     return
 
             # this runs basic validation, including JSON loading if required
-            self.data, self.errors = schema.validate('dataformat', data)
+            self.data, self.errors = schema.validate("dataformat", data)
 
         self.resolved = copy.deepcopy(self.data)
 
         # remove reserved fields
         def is_reserved(x):
-            '''Returns if the field name is a reserved name'''
-            return (x.startswith('__') and x.endswith('__')) or \
-                    x in ('#description', '#schema_version')
+            """Returns if the field name is a reserved name"""
+            return (x.startswith("__") and x.endswith("__")) or x in (
+                "#description",
+                "#schema_version",
+            )
 
         for key in list(self.resolved):
-            if is_reserved(key): del self.resolved[key]
+            if is_reserved(key):
+                del self.resolved[key]
 
         if self.errors:
-            #don't proceed with the rest of validation
+            # don't proceed with the rest of validation
             self.errors = utils.uniq(self.errors)
             return
 
         def maybe_load_format(name, obj, dataformat_cache):
             """Tries to load a given dataformat from its relative path"""
 
-            if isinstance(obj, six.string_types) and obj.find('/') != -1: #load it
+            if isinstance(obj, six.string_types) and obj.find("/") != -1:  # load it
 
-                if obj in dataformat_cache: #reuse
+                if obj in dataformat_cache:  # reuse
 
-                    if dataformat_cache[obj] is None: #recursion detected
-                        self.errors.append("recursion for dataformat `%s' detected" % obj)
+                    if dataformat_cache[obj] is None:  # recursion detected
+                        self.errors.append(
+                            "recursion for dataformat `%s' detected" % obj
+                        )
                         return self
 
                     self.referenced[obj] = dataformat_cache[obj]
 
-                else: #load it
-                    self.referenced[obj] = DataFormat(self.prefix, obj, (self, name),
-                            dataformat_cache)
+                else:  # load it
+                    self.referenced[obj] = DataFormat(
+                        self.prefix, obj, (self, name), dataformat_cache
+                    )
 
                 if not self.referenced[obj].valid:
                     self.errors.append("referred dataformat `%s' is invalid" % obj)
 
                 return self.referenced[obj]
 
-            elif isinstance(obj, dict): #can cache it, must load from scratch
+            elif isinstance(obj, dict):  # can cache it, must load from scratch
                 return DataFormat(self.prefix, obj, (self, name), dataformat_cache)
 
             elif isinstance(obj, list):
@@ -195,8 +209,8 @@ class DataFormat(BackendDataFormat):
         # now checks that every referred dataformat also validates, and accumulates
         # errors
         for field, value in self.data.items():
-            if field in ('#description', '#schema_version'):
-                continue #skip the description and schema version meta attributes
+            if field in ("#description", "#schema_version"):
+                continue  # skip the description and schema version meta attributes
             self.resolved[field] = maybe_load_format(field, value, dataformat_cache)
             if isinstance(self.resolved[field], DataFormat):
                 if not self.resolved[field].valid:
@@ -205,24 +219,27 @@ class DataFormat(BackendDataFormat):
         # at this point, there should be no more external references in
         # ``self.resolved``. We treat the "#extends" property, which requires a
         # special handling, given its nature.
-        if '#extends' in self.resolved:
+        if "#extends" in self.resolved:
 
-            ext = self.data['#extends']
+            ext = self.data["#extends"]
             self.referenced[ext] = maybe_load_format(self.name, ext, dataformat_cache)
-            basetype = self.resolved['#extends']
+            basetype = self.resolved["#extends"]
 
             # before updating, checks there is no name clash if basetype.valid:
             if basetype.valid:
                 for attrname in self.resolved:
-                    if attrname == '#extends': continue
+                    if attrname == "#extends":
+                        continue
                     if attrname in basetype.resolved:
-                        self.errors.append("the attribute `%s' in `%s' clashes with an " \
-                                "attribute with the same name on the extended class " \
-                                "`%s'" %  (attrname, self.name, basetype.name))
+                        self.errors.append(
+                            "the attribute `%s' in `%s' clashes with an "
+                            "attribute with the same name on the extended class "
+                            "`%s'" % (attrname, self.name, basetype.name)
+                        )
                 tmp = self.resolved
                 self.resolved = basetype.resolved
                 self.resolved.update(tmp)
-                del self.resolved['#extends'] #avoids infinite recursion
+                del self.resolved["#extends"]  # avoids infinite recursion
 
             else:
                 self.errors.append("referred dataformat `%s' is invalid" % ext)
diff --git a/beat/core/dock.py b/beat/core/dock.py
index 05296802ae79f2e3d956e2d25e0da6c8126b3ef2..4fcd1e6eaa22e455b37dce0b467d02db0d62670d 100644
--- a/beat/core/dock.py
+++ b/beat/core/dock.py
@@ -1,29 +1,38 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2017 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
+
 
 """
 ====
@@ -54,7 +63,6 @@ class Host(object):
 
     images_cache = {}
 
-
     def __init__(self, images_cache=None, raise_on_errors=True, discover=True):
 
         # Initialisations
@@ -66,50 +74,54 @@ class Host(object):
         self.db_environments = {}
 
         # (If necessary) Load the known infos about the images
-        if (self.images_cache_filename is not None) and os.path.exists(self.images_cache_filename):
-            with open(self.images_cache_filename, 'r') as f:
+        if (self.images_cache_filename is not None) and os.path.exists(
+            self.images_cache_filename
+        ):
+            with open(self.images_cache_filename, "r") as f:
                 Host.images_cache = simplejson.load(f)
 
         # Discover the environments
         if discover:
-            (self.processing_environments, self.db_environments) = self._discover_environments()
+            (
+                self.processing_environments,
+                self.db_environments,
+            ) = self._discover_environments()
 
         # (If necessary) Save the known infos about the images
         if self.images_cache_filename is not None:
-            with open(self.images_cache_filename, 'w') as f:
+            with open(self.images_cache_filename, "w") as f:
                 simplejson.dump(Host.images_cache, f, indent=4)
 
-
     def __contains__(self, key):
         return (key in self.processing_environments) or (key in self.db_environments)
 
-
     def __str__(self):
-        s = 'Docker host'
+        s = "Docker host"
 
         if self.base_url is not None:
-            s += ' (%s)' % self.base_url
+            s += " (%s)" % self.base_url
 
         return s
 
-
     def env2docker(self, key):
         """Returns a nice docker image name given a BEAT environment key"""
 
         attrs = self.processing_environments[key]
-        return attrs['image']
-
+        return attrs["image"]
 
     def db2docker(self, db_names):
         """Returns a nice docker image name given a database name"""
 
         def _all_in(db_names, databases):
-            return len([ x for x in db_names if x in databases ]) == len(db_names)
-
-        attrs = [ x for x in self.db_environments.values() if _all_in(db_names, x['databases']) ][0]
+            return len([x for x in db_names if x in databases]) == len(db_names)
 
-        return attrs['image']
+        attrs = [
+            x
+            for x in self.db_environments.values()
+            if _all_in(db_names, x["databases"])
+        ][0]
 
+        return attrs["image"]
 
     def teardown(self):
         for container in self.containers:
@@ -117,17 +129,24 @@ class Host(object):
 
         self.containers = []
 
-
     def __exit__(self, *exc):
         self.teardown()
 
-
     def full_environment_name(self, name):
         try:
-            return list(filter(lambda x: x.startswith(name  + ' ('), self.processing_environments.keys()))[0]
+            return list(
+                filter(
+                    lambda x: x.startswith(name + " ("),
+                    self.processing_environments.keys(),
+                )
+            )[0]
         except:
             try:
-                return list(filter(lambda x: x.startswith(name  + ' ('), self.db_environments.keys()))[0]
+                return list(
+                    filter(
+                        lambda x: x.startswith(name + " ("), self.db_environments.keys()
+                    )
+                )[0]
             except:
                 return None
 
@@ -135,10 +154,9 @@ class Host(object):
     def ip(self):
         """The IP address of the docker host"""
         s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
-        s.connect(('8.8.8.8', 1))  # connecting to a UDP address doesn't send packets
+        s.connect(("8.8.8.8", 1))  # connecting to a UDP address doesn't send packets
         return s.getsockname()[0]
 
-
     def _discover_environments(self):
         """Returns a dictionary containing information about docker environments
 
@@ -156,13 +174,7 @@ class Host(object):
             if image in Host.images_cache:
                 return Host.images_cache[image]
 
-            cmd = [
-                'docker',
-                'run',
-                '--rm=true',
-                image,
-                'describe'
-            ]
+            cmd = ["docker", "run", "--rm=true", image, "describe"]
 
             (status, stdout, stderr) = self._exec(cmd)
 
@@ -172,36 +184,43 @@ class Host(object):
                     Host.images_cache[image] = infos
                     return infos
                 except Exception as e:
-                    logger.warn("Ignoring potential environment at `%s' since " \
-                            "`describe' output cannot be parsed: %s", image, str(e))
+                    logger.warn(
+                        "Ignoring potential environment at `%s' since "
+                        "`describe' output cannot be parsed: %s",
+                        image,
+                        str(e),
+                    )
             else:
-                logger.warn("Execution failed with status {}: \n"
-                            "stdout: '{}'\n"
-                            "stderr: '{}'".format(status, stdout, stderr))
+                logger.warn(
+                    "Execution failed with status {}: \n"
+                    "stdout: '{}'\n"
+                    "stderr: '{}'".format(status, stdout, stderr)
+                )
             return {}
 
-
         def _must_replace(image, environments, key):
             # this check avoids we do a new environment and, by mistake,
             # override it with a previous version or the contrary.
             if self.raise_on_errors:
-                raise RuntimeError("Environments at '%s' and '%s' have the " \
-                        "same name ('%s'). Distinct environments must be " \
-                        "uniquely named. Fix this and re-start." % \
-                        (image, environments[key]['image'], key))
+                raise RuntimeError(
+                    "Environments at '%s' and '%s' have the "
+                    "same name ('%s'). Distinct environments must be "
+                    "uniquely named. Fix this and re-start."
+                    % (image, environments[key]["image"], key)
+                )
 
             new_version = None
             previous_version = None
 
-            parts = image.split('/')
+            parts = image.split("/")
             if len(parts) > 1:
-                parts = parts[-1].split(':')
+                parts = parts[-1].split(":")
                 if len(parts) > 1:
                     new_version = parts[-1]
 
-            parts = environments[key]['image'].split('/')
+            parts = environments[key]["image"].split("/")
             if len(parts) > 1:
-                parts = parts[-1].split(':')
+                parts = parts[-1].split(":")
                 if len(parts) > 1:
                     previous_version = parts[-1]
 
@@ -209,16 +228,18 @@ class Host(object):
             keep = False
 
             if (new_version is not None) and (previous_version is not None):
-                if new_version == 'latest':
+                if new_version == "latest":
                     replacement = True
-                elif previous_version == 'latest':
+                elif previous_version == "latest":
                     keep = True
                 else:
                     try:
-                        new_version = tuple([ int(x) for x in new_version.split('.') ])
+                        new_version = tuple([int(x) for x in new_version.split(".")])
 
                         try:
-                            previous_version = tuple([ int(x) for x in previous_version.split('.') ])
+                            previous_version = tuple(
+                                [int(x) for x in previous_version.split(".")]
+                            )
 
                             if new_version > previous_version:
                                 replacement = True
@@ -236,37 +257,44 @@ class Host(object):
                 keep = True
 
             if replacement:
-                logger.debug("Overriding **existing** environment '%s' in image '%s'", key, environments[key]['image'])
+                logger.debug(
+                    "Overriding **existing** environment '%s' in image '%s'",
+                    key,
+                    environments[key]["image"],
+                )
             elif keep:
-                logger.debug("Environment '%s' already existing in image '%s', we'll keep it", key, environments[key]['image'])
+                logger.debug(
+                    "Environment '%s' already existing in image '%s', we'll keep it",
+                    key,
+                    environments[key]["image"],
+                )
                 return False
             else:
-                logger.warn("Overriding **existing** environment '%s' image " \
-                        "with '%s'. To avoid this warning make " \
-                        "sure your docker images do not contain environments " \
-                        "with the same names", key, environments[key]['image'])
+                logger.warn(
+                    "Overriding **existing** environment '%s' image "
+                    "with '%s'. To avoid this warning make "
+                    "sure your docker images do not contain environments "
+                    "with the same names",
+                    key,
+                    environments[key]["image"],
+                )
 
             return True
 
-
         environments = {}
         db_environments = {}
 
-        cmd = [
-            'docker',
-            'images',
-            '--format',
-            '{{.Repository}}:{{.Tag}}',
-        ]
+        cmd = ["docker", "images", "--format", "{{.Repository}}:{{.Tag}}"]
 
         (status, stdout, stderr) = self._exec(cmd)
 
         if status != 0:
-            logger.error("Failed to retrieve the list of docker images, reason:\n\n%s", stderr)
+            logger.error(
+                "Failed to retrieve the list of docker images, reason:\n\n%s", stderr
+            )
             return (environments, db_environments)
 
-        images = [ x for x in stdout.split('\n') if x.find('beat.env.') >= 0 ]
-
+        images = [x for x in stdout.split("\n") if x.find("beat.env.") >= 0]
 
         for image in images:
             # Call the "describe" application on each existing image
@@ -274,30 +302,35 @@ class Host(object):
             if not description:
                 continue
 
-            key = description['name'] + ' (' + description['version'] + ')'
+            key = description["name"] + " (" + description["version"] + ")"
 
-            if 'databases' in description:
-                if (key in db_environments) and not _must_replace(image, db_environments, key):
+            if "databases" in description:
+                if (key in db_environments) and not _must_replace(
+                    image, db_environments, key
+                ):
                     continue
 
                 db_environments[key] = description
-                db_environments[key]['image'] = image
+                db_environments[key]["image"] = image
             else:
-                if (key in environments) and not _must_replace(image, environments, key):
+                if (key in environments) and not _must_replace(
+                    image, environments, key
+                ):
                     continue
 
                 environments[key] = description
-                environments[key]['image'] = image
+                environments[key]["image"] = image
 
             logger.info("Registered '%s' -> '%s'", key, image)
 
-
-        logger.debug("Found %d environments and %d database environments", len(environments),
-                     len(db_environments))
+        logger.debug(
+            "Found %d environments and %d database environments",
+            len(environments),
+            len(db_environments),
+        )
 
         return (environments, db_environments)
 
-
     def create_container(self, image, command):
 
         if image in self:  # Replace by a real image name
@@ -305,7 +338,6 @@ class Host(object):
 
         return Container(image, command)
 
-
     def start(self, container, virtual_memory_in_megabytes=0, max_cpu_percent=0):
         """Starts the execution of a container
 
@@ -328,11 +360,7 @@ class Host(object):
             limitation is not put in place.
         """
 
-        cmd = [
-            'docker',
-            'run',
-            '-tid',
-        ]
+        cmd = ["docker", "run", "-tid"]
 
         network = container.network
         if network:
@@ -356,24 +384,25 @@ class Host(object):
 
         if container.image in Host.images_cache:
             image_infos = Host.images_cache[container.image]
-            if ('capabilities' in image_infos) and ('gpu' in image_infos['capabilities']):
-                cmd.append('--runtime=nvidia')
-
+            if ("capabilities" in image_infos) and (
+                "gpu" in image_infos["capabilities"]
+            ):
+                cmd.append("--runtime=nvidia")
 
         if virtual_memory_in_megabytes:
             # For this to work properly, memory swap limitation has to be
-            # enabled on the kernel. This typically goes by setting
+            #  enabled on the kernel. This typically goes by setting
             # "cgroup_enable=memory" as a boot parameter to kernels which are
             # compiled with this support.
             # More info: https://docs.docker.com/engine/installation/linux/ubuntulinux/#/enable-memory-and-swap-accounting
-            logger.debug('Setting maximum memory to %dMB' % virtual_memory_in_megabytes)
-            cmd.append('--memory=%dm' % virtual_memory_in_megabytes)
-            cmd.append('--memory-swap=%dm' % virtual_memory_in_megabytes)
+            logger.debug("Setting maximum memory to %dMB" % virtual_memory_in_megabytes)
+            cmd.append("--memory=%dm" % virtual_memory_in_megabytes)
+            cmd.append("--memory-swap=%dm" % virtual_memory_in_megabytes)
 
         if max_cpu_percent:
             # The period corresponds to the scheduling interval for the CFS in
             # Linux. The quota corresponds to a fraction or a multiple of the
-            # period, the container will get. A quota that is 2x the period
+            #  period, the container will get. A quota that is 2x the period
             # gets the container up to 200% cpu time (2 cores). If the quota is
             # 0.5x the period, the container gets up to 50% the cpu time. Each
             # core represents 100%. A system with 2 cores has 200% computing
@@ -392,10 +421,10 @@ class Host(object):
             period = 100000  # microseconds
             quota = max_cpu_percent / 100.0
 
-            logger.debug('Setting CPU quota to %d%%' % max_cpu_percent)
+            logger.debug("Setting CPU quota to %d%%" % max_cpu_percent)
 
-            cmd.append('--cpu-period=%d' % period)
-            cmd.append('--cpu-quota=%d' % int(quota * period))
+            cmd.append("--cpu-period=%d" % period)
+            cmd.append("--cpu-quota=%d" % int(quota * period))
 
         # Mount the volumes
         cmd.extend(container.volumes)
@@ -409,17 +438,19 @@ class Host(object):
         cmd.append(container.image)
         cmd.extend(container.command)
 
-
         # Instantiate the container
-        logger.debug("Creation and start of a container: image=%s, command=\"%s\"",
-                     container.image, ' '.join(container.command))
+        logger.debug(
+            'Creation and start of a container: image=%s, command="%s"',
+            container.image,
+            " ".join(container.command),
+        )
 
-        logger.debug("Docker command: %s", ' '.join(cmd))
+        logger.debug("Docker command: %s", " ".join(cmd))
 
         (status, stdout, stderr) = self._exec(cmd)
 
-        if stdout != '':
-            container.id = stdout.replace('\n', '')
+        if stdout != "":
+            container.id = stdout.replace("\n", "")
             self.containers.append(container)
 
         if status != 0:
@@ -433,7 +464,6 @@ class Host(object):
 
         logger.debug("Container ID: '%s'", container.id)
 
-
     def wait(self, container, timeout=None):
         """Wait for the container to finish its job
 
@@ -444,38 +474,36 @@ class Host(object):
             waits forever.
         """
 
-        (status, stdout, stderr) = self._exec(['docker', 'wait', container.id],
-                                              timeout=timeout)
+        (status, stdout, stderr) = self._exec(
+            ["docker", "wait", container.id], timeout=timeout
+        )
         if status != 0:
             return None
 
         return int(stdout)
 
-
     def status(self, container):
         """Checks the status of a given container"""
 
         logger.debug("Inspect container %s", container.id)
 
-        (status, stdout, stderr) = self._exec(['docker', 'inspect', container.id])
+        (status, stdout, stderr) = self._exec(["docker", "inspect", container.id])
         if status != 0:
             return None
 
         try:
-            return simplejson.loads(stdout)[0]['State']['Status']
+            return simplejson.loads(stdout)[0]["State"]["Status"]
         except:
             return None
 
-
     def logs(self, container):
         """Returns the logs of a container"""
 
-        (status, stdout, stderr) = self._exec(['docker', 'logs', container.id])
+        (status, stdout, stderr) = self._exec(["docker", "logs", container.id])
         if status != 0:
-            return ''
-
-        return stdout.replace('\r\n', '\n')
+            return ""
 
+        return stdout.replace("\r\n", "\n")
 
     def statistics(self, container):
         """Returns the statistics about a container"""
@@ -485,29 +513,25 @@ class Host(object):
         data = client.stats(container.id, stream=False)
 
         # If CPU statistics can't be retrieved
-        if 'system_cpu_usage' not in data['cpu_stats']:
-            data['cpu_stats'] = dict(data['precpu_stats'])
+        if "system_cpu_usage" not in data["cpu_stats"]:
+            data["cpu_stats"] = dict(data["precpu_stats"])
 
         # If memory statistics can't be retrieved
-        if len(data['memory_stats']) == 0:
-            data['memory_stats'] = dict(
-                limit=0,
-                max_usage=0
-            )
+        if len(data["memory_stats"]) == 0:
+            data["memory_stats"] = dict(limit=0, max_usage=0)
 
-        previous_cpu = container._stats['cpu_stats'] if container._stats else None
+        previous_cpu = container._stats["cpu_stats"] if container._stats else None
 
         # merge statistics
         retval = dict(
-            cpu=stats.cpu_statistics(previous_cpu, data['cpu_stats']),
-            memory=stats.memory_statistics(data['memory_stats']),
+            cpu=stats.cpu_statistics(previous_cpu, data["cpu_stats"]),
+            memory=stats.memory_statistics(data["memory_stats"]),
         )
 
         container._stats = data
 
         return retval
 
-
     def rm(self, container):
         """Removes a given container. If it is not done, kill it first"""
 
@@ -516,24 +540,24 @@ class Host(object):
 
         status = self.status(container)
 
-        if status not in ('created', 'exited'):
-            logger.warn("Killing container '%s' which is on state '%s'", container.id, status)
-            self._exec(['docker', 'container', 'stop', container.id])
+        if status not in ("created", "exited"):
+            logger.warn(
+                "Killing container '%s' which is on state '%s'", container.id, status
+            )
+            self._exec(["docker", "container", "stop", container.id])
 
         logger.debug("Remove container %s", container.id)
-        (status, stdout, stderr) = self._exec(['docker', 'rm', container.id])
+        (status, stdout, stderr) = self._exec(["docker", "rm", container.id])
 
         self.containers.remove(container)
 
         container.id = None
 
-
     def kill(self, container):
         """Stop a container"""
 
-        if self.status(container) == 'running':
-            self._exec(['docker', 'kill', container.id])
-
+        if self.status(container) == "running":
+            self._exec(["docker", "kill", container.id])
 
     def run(self, image, command):
         """Runs a command and retrieves its status and output"""
@@ -554,35 +578,37 @@ class Host(object):
 
         return status, output
 
-
     def get_ipaddress(self, container):
         """ Returns the ip address of the given container"""
 
         cmd = [
-            'docker',
-            'inspect',
-            '--format',
-            '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}',
-            container.id
+            "docker",
+            "inspect",
+            "--format",
+            "{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}",
+            container.id,
         ]
 
         (status, stdout, stderr) = self._exec(cmd)
 
         if status != 0:
-            logger.error("Failed to retrieve the ip address of the container, reason:\n\n%s", stderr)
+            logger.error(
+                "Failed to retrieve the ip address of the container, reason:\n\n%s",
+                stderr,
+            )
             return None
 
-        return stdout.replace('\n', '')
+        return stdout.replace("\n", "")
 
     def _exec(self, command, timeout=None):
         process_stdout = tempfile.NamedTemporaryFile()
         process_stderr = tempfile.NamedTemporaryFile()
 
         def _read_streams():
-            with open(process_stdout.name, 'r') as f:
+            with open(process_stdout.name, "r") as f:
                 stdout = f.read()
 
-            with open(process_stderr.name, 'r') as f:
+            with open(process_stderr.name, "r") as f:
                 stderr = f.read()
 
             return (stdout, stderr)
@@ -624,7 +650,6 @@ class Container:
         :param str command: Command to execute in the container.
     """
 
-
     def __init__(self, image, command):
         self.image = image
         self.command = command
@@ -639,26 +664,22 @@ class Container:
         self._workdir = None
         self._entrypoint = None
 
-
     def set_name(self, name):
         """ Set the name to be used by the container in place of the docker
         auto generated one.
         """
         self._name = name
 
-
     def set_workdir(self, workdir):
         """ Set the work folder to be used by the container
         """
         self._workdir = workdir
 
-
     def set_entrypoint(self, entrypoint):
         """ Set the entry point to be used by the container
         """
         self._entrypoint = entrypoint
 
-
     def add_volume(self, path, mount_path, read_only=True):
         """Add a volume to be mounted on the container
 
@@ -670,11 +691,7 @@ class Container:
             :param boolean read_only: Whether the volume will be read only
         """
 
-        self._volumes[path] = {
-          'bind': mount_path,
-          'mode': 'ro' if read_only else 'rw',
-        }
-
+        self._volumes[path] = {"bind": mount_path, "mode": "ro" if read_only else "rw"}
 
     def add_port(self, container_port, host_port, host_address=None):
         """Add a port binding
@@ -705,37 +722,32 @@ class Container:
 
         self._environment_variables[name] = value
 
-
     def reset_ports(self):
         """Empty the port bindings"""
 
         self._ports = {}
 
-
     @property
     def name(self):
-        name = ''
+        name = ""
         if self._name:
-            name = '--name=%s' % self._name
+            name = "--name=%s" % self._name
         return name
 
-
     @property
     def workdir(self):
-        workdir = ''
+        workdir = ""
         if self._workdir:
-            workdir = '--workdir=%s' % self._workdir
+            workdir = "--workdir=%s" % self._workdir
         return workdir
 
-
     @property
     def entrypoint(self):
-        entrypoint = ''
+        entrypoint = ""
         if self._entrypoint:
-            entrypoint = '--entrypoint=%s' % self._entrypoint
+            entrypoint = "--entrypoint=%s" % self._entrypoint
         return entrypoint
 
-
     @property
     def volumes(self):
         """Returns the volumes of this container in a suitable form to build
@@ -744,21 +756,22 @@ class Container:
 
         volumes = []
         for k, v in self._volumes.items():
-            if k.startswith('nfs://'):
-                addr, src = k[6:].split(':')
-                volumes.append('--mount=type=volume,'
-                                       'dst={dst},'
-                                       'volume-driver=local,'
-                                       'volume-opt=type=nfs,'
-                                       'volume-opt=device=:{src},'
-                                       'volume-opt=o=addr={addr}'.format(dst=v['bind'], src=src, addr=addr))
+            if k.startswith("nfs://"):
+                addr, src = k[6:].split(":")
+                volumes.append(
+                    "--mount=type=volume,"
+                    "dst={dst},"
+                    "volume-driver=local,"
+                    "volume-opt=type=nfs,"
+                    "volume-opt=device=:{src},"
+                    "volume-opt=o=addr={addr}".format(dst=v["bind"], src=src, addr=addr)
+                )
             else:
-                if k.startswith('file://'):
+                if k.startswith("file://"):
                     k = k[6:]
-                volumes.append('--volume=%s:%s:%s' % (k, v['bind'], v['mode']))
+                volumes.append("--volume=%s:%s:%s" % (k, v["bind"], v["mode"]))
         return volumes
 
-
     @property
     def ports(self):
         """Returns the ports of this container in a suitable form to build
@@ -767,14 +780,13 @@ class Container:
 
         ports = []
         for k, v in self._ports.items():
-            ports.append('-p')
+            ports.append("-p")
             if isinstance(v, tuple):
-                ports.append('%s:%d:%d' % (v[0], v[1], k))
+                ports.append("%s:%d:%d" % (v[0], v[1], k))
             else:
-                ports.append('%d:%d' % (v[0], k))
+                ports.append("%d:%d" % (v[0], k))
         return ports
 
-
     @property
     def environment_variables(self):
         """Returns the environment variables to set on this container.
@@ -782,25 +794,23 @@ class Container:
 
         environment_variables = []
         for k, v in self._environment_variables.items():
-            environment_variables.append('--env={}={}'.format(k, v))
+            environment_variables.append("--env={}={}".format(k, v))
         return environment_variables
 
-
     @property
     def network(self):
-        network = ''
+        network = ""
         if self.network_name:
-            network = '--network=' + self.network_name
+            network = "--network=" + self.network_name
         return network
 
     @property
     def user(self):
-        user = ''
+        user = ""
         if self.uid:
-            user = '--user={0}:{0}'.format(self.uid)
+            user = "--user={0}:{0}".format(self.uid)
         return user
 
-
     @property
     def command_line(self):
         """Returns the complete docker command to start the container and
@@ -813,15 +823,15 @@ class Container:
         cmd = "docker run -ti --rm=true "
         cmd += "%s " % self.network
         cmd += "%s " % self.user
-        cmd += ' '.join(self.volumes)
-        cmd += ' '.join(self.ports)
-        cmd += ' '.join(self.environment_variables)
+        cmd += " ".join(self.volumes)
+        cmd += " ".join(self.ports)
+        cmd += " ".join(self.environment_variables)
         cmd += "%s " % self.name
         cmd += "%s " % self.workdir
         cmd += "%s " % self.entrypoint
 
         cmd += "%s " % self.image
 
-        cmd += '"%s"' % ' '.join(self.command)
+        cmd += '"%s"' % " ".join(self.command)
 
         return cmd
diff --git a/beat/core/drawing.py b/beat/core/drawing.py
index 746c3bd530d8597456a1858e06cb1a4ba42e0e36..af2f3063ed424565729155903d08566a68a1fa9a 100644
--- a/beat/core/drawing.py
+++ b/beat/core/drawing.py
@@ -1,29 +1,38 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
+
 
 """
 =======
@@ -55,9 +64,12 @@ def text_color(c):
     """
 
     c = int(c[1:3], 16), int(c[3:5], 16), int(c[5:], 16)
-    a = 1 - (0.299 * c[0] + 0.587 * c[1] + 0.114 * c[2])/255;
-    if a < 0.5: return '#000000'
-    else: return '#ffffff'
+    a = 1 - (0.299 * c[0] + 0.587 * c[1] + 0.114 * c[2]) / 255
+    if a < 0.5:
+        return "#000000"
+    else:
+        return "#ffffff"
+
 
 def lighten_color(n):
     """Lightens the given color
@@ -75,9 +87,9 @@ def lighten_color(n):
     """
 
     c = int(n[1:3], 16), int(n[3:5], 16), int(n[5:], 16)
-    c = [k+120 for k in c]
-    c = map(lambda k: k if k <= 0xff else 0xff, c)
-    return '#%02x%02x%02x' % tuple(c)
+    c = [k + 120 for k in c]
+    c = map(lambda k: k if k <= 0xFF else 0xFF, c)
+    return "#%02x%02x%02x" % tuple(c)
 
 
 def create_port_table(type, names, color):
@@ -100,14 +112,19 @@ def create_port_table(type, names, color):
         compatible with GraphViz.
     """
 
-    retval = '<td><table border="0" cellspacing="5" bgcolor="%s">' % \
-            lighten_color(color)
+    retval = '<td><table border="0" cellspacing="5" bgcolor="%s">' % lighten_color(
+        color
+    )
     for n in names:
-        port = 'port="%s_%s" ' % (type, n) if n.find('<') < 0 else '' #results
-        retval += '<tr><td %sbgcolor="%s" border="1"><font color="%s">%s</font></td></tr>' % (port, color, text_color(color), n)
-    retval += '</table></td>'
+        port = 'port="%s_%s" ' % (type, n) if n.find("<") < 0 else ""  # results
+        retval += (
+            '<tr><td %sbgcolor="%s" border="1"><font color="%s">%s</font></td></tr>'
+            % (port, color, text_color(color), n)
+        )
+    retval += "</table></td>"
     return retval
 
+
 def create_layout_ports_table(color, input_names=[], output_names=[]):
     """Creates an HTML table with the defined input & output port names
 
@@ -130,26 +147,30 @@ def create_layout_ports_table(color, input_names=[], output_names=[]):
         compatible with GraphViz.
     """
 
-    retval = '<td><table border="0" bgcolor="%s">' % \
-            lighten_color(color)
+    retval = '<td><table border="0" bgcolor="%s">' % lighten_color(color)
     num_rows = max(len(input_names), len(output_names))
     width = 200 if len(input_names) == 0 or len(output_names) == 0 else 100
     for x in range(0, num_rows):
-        retval += '<tr>'
+        retval += "<tr>"
         if len(input_names) > x:
             n = input_names[x]
-            port = 'port="input_%s" ' % n if n.find('<') < 0 else '' #results
-            retval += '<td %sbgcolor="%s" border="1" fixedsize="true" width="%s" height="20"><font color="%s">%s</font></td>' % \
-                    (port, color, width, text_color(color), x)
+            port = 'port="input_%s" ' % n if n.find("<") < 0 else ""  # results
+            retval += (
+                '<td %sbgcolor="%s" border="1" fixedsize="true" width="%s" height="20"><font color="%s">%s</font></td>'
+                % (port, color, width, text_color(color), x)
+            )
         if len(output_names) > x:
             n = output_names[x]
-            port = 'port="output_%s" ' % n if n.find('<') < 0 else '' #results
-            retval += '<td %sbgcolor="%s" border="1" fixedsize="true" width="%s" height="20"><font color="%s">%s</font></td>' % \
-                    (port, color, width, text_color(color), x)
-        retval += '</tr>'
-    retval += '</table></td>'
+            port = 'port="output_%s" ' % n if n.find("<") < 0 else ""  # results
+            retval += (
+                '<td %sbgcolor="%s" border="1" fixedsize="true" width="%s" height="20"><font color="%s">%s</font></td>'
+                % (port, color, width, text_color(color), x)
+            )
+        retval += "</tr>"
+    retval += "</table></td>"
     return retval
 
+
 def make_label(inputs, name, outputs, color):
     """Creates an HTML Table representing the label for a given block
 
@@ -176,13 +197,15 @@ def make_label(inputs, name, outputs, color):
 
     light_color = lighten_color(color)
     retval = '<<table border="0" cellspacing="0" bgcolor="%s"><tr>' % light_color
-    if inputs: retval += create_port_table('input', inputs, color)
-    retval += '<td><font color="%s">%s</font></td>' % \
-            (text_color(light_color), name)
-    if outputs: retval += create_port_table('output', outputs, color)
-    retval += '</tr></table>>'
+    if inputs:
+        retval += create_port_table("input", inputs, color)
+    retval += '<td><font color="%s">%s</font></td>' % (text_color(light_color), name)
+    if outputs:
+        retval += create_port_table("output", outputs, color)
+    retval += "</tr></table>>"
     return retval
 
+
 def make_layout_label(inputs, name, outputs, color):
     """Creates an HTML Table representing the label for a given block
 
@@ -208,11 +231,11 @@ def make_layout_label(inputs, name, outputs, color):
     """
 
     light_color = lighten_color(color)
-    retval = '<<table border="0" bgcolor="%s">%s<tr>' % \
-            (
-                    light_color,
-                    '<tr><td><font color="%s">%s</font></td></tr>' % (text_color(light_color), name)
-            )
+    retval = '<<table border="0" bgcolor="%s">%s<tr>' % (
+        light_color,
+        '<tr><td><font color="%s">%s</font></td></tr>'
+        % (text_color(light_color), name),
+    )
     retval += create_layout_ports_table(color, inputs or [], outputs or [])
-    retval += '</tr></table>>'
+    retval += "</tr></table>>"
     return retval
diff --git a/beat/core/environments.py b/beat/core/environments.py
index 48c191bcfc6a968daac32667df9088807425262c..44bfee3fa99b165ad67a47f7266be9756f85c76b 100644
--- a/beat/core/environments.py
+++ b/beat/core/environments.py
@@ -1,29 +1,38 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2018 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
+
 
 """
 ===========
@@ -62,7 +71,7 @@ def enumerate_packages(host, environment_name):
 
     status = host.wait(container)
     if status != 0:
-        logger.error('Command error: {}'.format(status))
+        logger.error("Command error: {}".format(status))
         return packages
 
     output = host.logs(container)
@@ -70,12 +79,9 @@ def enumerate_packages(host, environment_name):
     package_lines = output.split("\n")
 
     for package_line in package_lines:
-        information = re.split('\s+', package_line)
+        information = re.split("\s+", package_line)
         if len(information) == 4:
-            packages.append({
-                'name': information[0],
-                'version': information[1]
-            })
+            packages.append({"name": information[0], "version": information[1]})
 
     host.rm(container)
     return packages
diff --git a/beat/core/execution/__init__.py b/beat/core/execution/__init__.py
index fb963b2d7b9cc82bc0abf19fa81c0c064b738e58..85c6ecf72495e01d53a71a61fc5a46e212e6b686 100644
--- a/beat/core/execution/__init__.py
+++ b/beat/core/execution/__init__.py
@@ -1,29 +1,37 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2017 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
 
 
 from .docker import DockerExecutor
diff --git a/beat/core/execution/base.py b/beat/core/execution/base.py
index ec419d270950b64403a337f027ed351d943d128e..23f09a3c7365a31079598f2e70b5e388a4336b86 100644
--- a/beat/core/execution/base.py
+++ b/beat/core/execution/base.py
@@ -1,29 +1,37 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2017 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
 
 
 """
@@ -35,13 +43,13 @@ Execution utilities
 """
 
 
-
 import os
 import sys
 import glob
 import collections
 
 import logging
+
 logger = logging.getLogger(__name__)
 
 import simplejson
@@ -137,13 +145,21 @@ class BaseExecutor(object):
 
     """
 
-    def __init__(self, prefix, data, cache=None, dataformat_cache=None,
-            database_cache=None, algorithm_cache=None, library_cache=None,
-            custom_root_folders=None):
+    def __init__(
+        self,
+        prefix,
+        data,
+        cache=None,
+        dataformat_cache=None,
+        database_cache=None,
+        algorithm_cache=None,
+        library_cache=None,
+        custom_root_folders=None,
+    ):
 
         # Initialisations
         self.prefix = prefix
-        self.cache = cache or os.path.join(self.prefix, 'cache')
+        self.cache = cache or os.path.join(self.prefix, "cache")
         self.algorithm = None
         self.loop_algorithm = None
         self.databases = {}
@@ -175,75 +191,95 @@ class BaseExecutor(object):
         # Basic validation of the data declaration, including JSON loading if required
         if not isinstance(data, dict):
             if not os.path.exists(data):
-                self.errors.append('File not found: %s' % data)
+                self.errors.append("File not found: %s" % data)
                 return
 
-        self.data, self.errors = schema.validate('execution', data)
+        self.data, self.errors = schema.validate("execution", data)
         if self.errors:
             return
 
         # Load the algorithm (using the algorithm cache if possible)
-        if self.data['algorithm'] in algorithm_cache:
-            self.algorithm = algorithm_cache[self.data['algorithm']]
+        if self.data["algorithm"] in algorithm_cache:
+            self.algorithm = algorithm_cache[self.data["algorithm"]]
         else:
-            self.algorithm = algorithm.Algorithm(self.prefix,
-                                                 self.data['algorithm'],
-                                                 dataformat_cache,
-                                                 library_cache)
+            self.algorithm = algorithm.Algorithm(
+                self.prefix, self.data["algorithm"], dataformat_cache, library_cache
+            )
             algorithm_cache[self.algorithm.name] = self.algorithm
 
         if not self.algorithm.valid:
             self.errors += self.algorithm.errors
             return
 
-        if 'loop' in self.data:
-            loop = self.data['loop']
-            if loop['algorithm'] in algorithm_cache:
-                self.loop_algorithm = algorithm_cache[loop['algorithm']]
+        if "loop" in self.data:
+            loop = self.data["loop"]
+            if loop["algorithm"] in algorithm_cache:
+                self.loop_algorithm = algorithm_cache[loop["algorithm"]]
             else:
-                self.loop_algorithm = algorithm.Algorithm(self.prefix,
-                                                          loop['algorithm'],
-                                                          dataformat_cache,
-                                                          library_cache)
+                self.loop_algorithm = algorithm.Algorithm(
+                    self.prefix, loop["algorithm"], dataformat_cache, library_cache
+                )
                 algorithm_cache[self.loop_algorithm.name] = self.loop_algorithm
 
-                if len(loop['inputs']) != len(self.loop_algorithm.input_map):
-                    self.errors.append("The number of inputs of the loop algorithm doesn't correspond")
+                if len(loop["inputs"]) != len(self.loop_algorithm.input_map):
+                    self.errors.append(
+                        "The number of inputs of the loop algorithm doesn't correspond"
+                    )
 
-                for name in self.data['inputs'].keys():
+                for name in self.data["inputs"].keys():
                     if name not in self.algorithm.input_map.keys():
-                        self.errors.append("The input '%s' doesn't exist in the loop algorithm" % name)
+                        self.errors.append(
+                            "The input '%s' doesn't exist in the loop algorithm" % name
+                        )
 
         # Check that the mapping in coherent
-        if len(self.data['inputs']) != len(self.algorithm.input_map):
-            self.errors.append("The number of inputs of the algorithm doesn't correspond")
-
-        if 'outputs' in self.data and (len(self.data['outputs']) != len(self.algorithm.output_map)):
-            self.errors.append("The number of outputs of the algorithm doesn't correspond")
-
-        for name in self.data['inputs'].keys():
+        if len(self.data["inputs"]) != len(self.algorithm.input_map):
+            self.errors.append(
+                "The number of inputs of the algorithm doesn't correspond"
+            )
+
+        if "outputs" in self.data and (
+            len(self.data["outputs"]) != len(self.algorithm.output_map)
+        ):
+            self.errors.append(
+                "The number of outputs of the algorithm doesn't correspond"
+            )
+
+        for name in self.data["inputs"].keys():
             if name not in self.algorithm.input_map.keys():
-                self.errors.append("The input '%s' doesn't exist in the algorithm" % name)
+                self.errors.append(
+                    "The input '%s' doesn't exist in the algorithm" % name
+                )
 
-        if 'outputs' in self.data:
-            for name in self.data['outputs'].keys():
+        if "outputs" in self.data:
+            for name in self.data["outputs"].keys():
                 if name not in self.algorithm.output_map.keys():
-                    self.errors.append("The output '%s' doesn't exist in the algorithm" % name)
+                    self.errors.append(
+                        "The output '%s' doesn't exist in the algorithm" % name
+                    )
 
-        if 'loop' in self.data:
-            for name in ['request', 'answer']:
+        if "loop" in self.data:
+            for name in ["request", "answer"]:
                 if name not in self.algorithm.loop_map.keys():
-                    self.errors.append("The loop '%s' doesn't exist in the algorithm" % name)
+                    self.errors.append(
+                        "The loop '%s' doesn't exist in the algorithm" % name
+                    )
 
         if self.errors:
             return
 
         # Load the databases (if any is required)
-        self._update_db_cache(self.data['inputs'], custom_root_folders, database_cache, dataformat_cache)
-
-        if 'loop' in self.data:
-            self._update_db_cache(self.data['loop']['inputs'], custom_root_folders, database_cache, dataformat_cache)
-
+        self._update_db_cache(
+            self.data["inputs"], custom_root_folders, database_cache, dataformat_cache
+        )
+
+        if "loop" in self.data:
+            self._update_db_cache(
+                self.data["loop"]["inputs"],
+                custom_root_folders,
+                database_cache,
+                dataformat_cache,
+            )
 
     def __enter__(self):
         """Prepares inputs and outputs for the processing task
@@ -258,7 +294,6 @@ class BaseExecutor(object):
 
         return self
 
-
     def __exit__(self, exc_type, exc_value, traceback):
         """Closes all sinks and disconnects inputs and outputs
         """
@@ -274,24 +309,26 @@ class BaseExecutor(object):
         self.output_list = None
         self.data_sinks = []
 
-
-    def _update_db_cache(self, inputs, custom_root_folders, database_cache, dataformat_cache):
+    def _update_db_cache(
+        self, inputs, custom_root_folders, database_cache, dataformat_cache
+    ):
         """ Update the database cache based on the input list given"""
 
         for name, details in inputs.items():
-            if 'database' in details:
+            if "database" in details:
 
-                if details['database'] not in self.databases:
+                if details["database"] not in self.databases:
 
-                    if details['database'] in database_cache:
-                        db = database_cache[details['database']]
+                    if details["database"] in database_cache:
+                        db = database_cache[details["database"]]
                     else:
-                        db = database.Database(self.prefix, details['database'],
-                                               dataformat_cache)
+                        db = database.Database(
+                            self.prefix, details["database"], dataformat_cache
+                        )
 
                         name = "database/%s" % db.name
                         if name in custom_root_folders:
-                            db.data['root_folder'] = custom_root_folders[name]
+                            db.data["root_folder"] = custom_root_folders[name]
 
                         database_cache[db.name] = db
 
@@ -300,21 +337,19 @@ class BaseExecutor(object):
                     if not db.valid:
                         self.errors += db.errors
 
-
     def _prepare_inputs(self):
         """Prepares all input required by the execution."""
 
         raise NotImplementedError()
 
-
     def _prepare_outputs(self):
         """Prepares all output required by the execution."""
 
         raise NotImplementedError()
 
-
-    def process(self, virtual_memory_in_megabytes=0, max_cpu_percent=0,
-                timeout_in_minutes=0):
+    def process(
+        self, virtual_memory_in_megabytes=0, max_cpu_percent=0, timeout_in_minutes=0
+    ):
         """Executes the user algorithm code
 
         Parameters:
@@ -343,37 +378,35 @@ class BaseExecutor(object):
 
         raise NotImplementedError()
 
-
     @property
     def valid(self):
         """A boolean that indicates if this executor is valid or not"""
 
         return not bool(self.errors)
 
-
     @property
     def analysis(self):
         """A boolean that indicates if the current block is an analysis block"""
-        return 'result' in self.data
-
+        return "result" in self.data
 
     @property
     def outputs_exist(self):
         """Returns ``True`` if outputs this block is supposed to produce exists."""
 
         if self.analysis:
-            path = os.path.join(self.cache, self.data['result']['path']) + '*'
-            if not glob.glob(path): return False
+            path = os.path.join(self.cache, self.data["result"]["path"]) + "*"
+            if not glob.glob(path):
+                return False
 
         else:
-            for name, details in self.data['outputs'].items():
-                path = os.path.join(self.cache, details['path']) + '*'
-                if not glob.glob(path): return False
+            for name, details in self.data["outputs"].items():
+                path = os.path.join(self.cache, details["path"]) + "*"
+                if not glob.glob(path):
+                    return False
 
         # if you get to this point all outputs already exist
         return True
 
-
     @property
     def io_statistics(self):
         """Summarize current I/O statistics looking at data sources and sinks, inputs and outputs
@@ -385,28 +418,25 @@ class BaseExecutor(object):
 
         return stats.io_statistics(self.data, self.input_list, self.output_list)
 
-
     def __str__(self):
         return simplejson.dumps(self.data, indent=4)
 
-
     def write(self, path):
         """Writes contents to precise filesystem location"""
 
-        with open(path, 'wt') as f:
+        with open(path, "wt") as f:
             f.write(str(self))
 
-
     def dump_runner_configuration(self, directory):
         """Exports contents useful for a backend runner to run the algorithm"""
 
         data = convert_experiment_configuration_to_container(self.data)
 
-        with open(os.path.join(directory, 'configuration.json'), 'wb') as f:
+        with open(os.path.join(directory, "configuration.json"), "wb") as f:
             json_data = simplejson.dumps(data, indent=2)
-            f.write(json_data.encode('utf-8'))
+            f.write(json_data.encode("utf-8"))
 
-        tmp_prefix = os.path.join(directory, 'prefix')
+        tmp_prefix = os.path.join(directory, "prefix")
         if not os.path.exists(tmp_prefix):
             os.makedirs(tmp_prefix)
 
@@ -415,16 +445,16 @@ class BaseExecutor(object):
         if self.loop_algorithm:
             self.loop_algorithm.export(tmp_prefix)
 
-
     def dump_databases_provider_configuration(self, directory):
         """Exports contents useful for a backend runner to run the algorithm"""
 
-        with open(os.path.join(directory, 'configuration.json'), 'wb') as f:
+        with open(os.path.join(directory, "configuration.json"), "wb") as f:
             json_data = simplejson.dumps(self.data, indent=2)
-            f.write(json_data.encode('utf-8'))
+            f.write(json_data.encode("utf-8"))
 
-        tmp_prefix = os.path.join(directory, 'prefix')
-        if not os.path.exists(tmp_prefix): os.makedirs(tmp_prefix)
+        tmp_prefix = os.path.join(directory, "prefix")
+        if not os.path.exists(tmp_prefix):
+            os.makedirs(tmp_prefix)
 
         for db in self.databases.values():
             db.export(tmp_prefix)
diff --git a/beat/core/execution/docker.py b/beat/core/execution/docker.py
index 8a25748cb97584303e3986208fe4dff69da02add..297a75cb4a2a859154089207427e39f866c53e9d 100644
--- a/beat/core/execution/docker.py
+++ b/beat/core/execution/docker.py
@@ -1,29 +1,38 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
+
 
 """
 ======
@@ -51,6 +60,7 @@ from .remote import RemoteExecutor
 
 logger = logging.getLogger(__name__)
 
+
 class DockerExecutor(RemoteExecutor):
     """DockerExecutor runs the code given an execution block information, externally
 
@@ -138,68 +148,87 @@ class DockerExecutor(RemoteExecutor):
 
     """
 
-    def __init__(self, host, prefix, data, cache=None, dataformat_cache=None,
-            database_cache=None, algorithm_cache=None, library_cache=None,
-            custom_root_folders=None):
-
-        super(DockerExecutor, self).__init__(prefix, data, host.ip, cache=cache,
-                                             dataformat_cache=dataformat_cache,
-                                             database_cache=database_cache,
-                                             algorithm_cache=algorithm_cache,
-                                             library_cache=library_cache,
-                                             custom_root_folders=custom_root_folders)
+    def __init__(
+        self,
+        host,
+        prefix,
+        data,
+        cache=None,
+        dataformat_cache=None,
+        database_cache=None,
+        algorithm_cache=None,
+        library_cache=None,
+        custom_root_folders=None,
+    ):
+
+        super(DockerExecutor, self).__init__(
+            prefix,
+            data,
+            host.ip,
+            cache=cache,
+            dataformat_cache=dataformat_cache,
+            database_cache=database_cache,
+            algorithm_cache=algorithm_cache,
+            library_cache=library_cache,
+            custom_root_folders=custom_root_folders,
+        )
 
         # Initialisations
         self.host = host
 
-
-    def __create_db_container(self, datasets_uid, network_name, configuration_name=None):
+    def __create_db_container(
+        self, datasets_uid, network_name, configuration_name=None
+    ):
         # Configuration and needed files
         databases_configuration_path = utils.temporary_directory()
         self.dump_databases_provider_configuration(databases_configuration_path)
 
         # Modify the paths to the databases in the dumped configuration files
-        root_folder = os.path.join(databases_configuration_path, 'prefix', 'databases')
+        root_folder = os.path.join(databases_configuration_path, "prefix", "databases")
 
         database_paths = {}
 
         for db_name in self.databases.keys():
-            json_path = os.path.join(root_folder, db_name + '.json')
+            json_path = os.path.join(root_folder, db_name + ".json")
 
-            with open(json_path, 'r') as f:
+            with open(json_path, "r") as f:
                 db_data = simplejson.load(f)
 
-            database_paths[db_name] = db_data['root_folder']
-            db_data['root_folder'] = os.path.join('/databases', db_name)
+            database_paths[db_name] = db_data["root_folder"]
+            db_data["root_folder"] = os.path.join("/databases", db_name)
 
-            with open(json_path, 'w') as f:
+            with open(json_path, "w") as f:
                 simplejson.dump(db_data, f, indent=4)
 
         # Determine the docker image to use for the databases
         try:
             databases_environment = self.host.db2docker(database_paths.keys())
         except:
-            raise RuntimeError("No environment found for the databases `%s' " \
-                "- available environments are %s" % (
-                  ", ".join(database_paths.keys()),
-                  ", ".join(self.host.db_environments.keys())))
+            raise RuntimeError(
+                "No environment found for the databases `%s' "
+                "- available environments are %s"
+                % (
+                    ", ".join(database_paths.keys()),
+                    ", ".join(self.host.db_environments.keys()),
+                )
+            )
 
         # Creation of the container
         # Note: we only support one databases image loaded at the same time
         database_port = utils.find_free_port()
 
         cmd = [
-            'databases_provider',
-            '0.0.0.0:%d' % database_port,
-            '/beat/prefix',
-            '/beat/cache'
+            "databases_provider",
+            "0.0.0.0:%d" % database_port,
+            "/beat/prefix",
+            "/beat/cache",
         ]
 
         if configuration_name:
             cmd.append(configuration_name)
 
         if logger.getEffectiveLevel() <= logging.DEBUG:
-            cmd.insert(1, '--debug')
+            cmd.insert(1, "--debug")
 
         databases_info_name = "beat_db_%s" % utils.id_generator()
         databases_info = self.host.create_container(databases_environment, cmd)
@@ -208,28 +237,33 @@ class DockerExecutor(RemoteExecutor):
         databases_info.set_name(databases_info_name)
 
         # Specify the volumes to mount inside the container
-        databases_info.add_volume(databases_configuration_path, '/beat/prefix')
-        databases_info.add_volume(self.cache, '/beat/cache')
+        databases_info.add_volume(databases_configuration_path, "/beat/prefix")
+        databases_info.add_volume(self.cache, "/beat/cache")
 
         for db_name, db_path in database_paths.items():
-            databases_info.add_volume(db_path, os.path.join('/databases', db_name))
+            databases_info.add_volume(db_path, os.path.join("/databases", db_name))
 
         # Start the container
         while True:
             try:
-                databases_info.add_port(database_port, database_port, host_address=self.host.ip)
+                databases_info.add_port(
+                    database_port, database_port, host_address=self.host.ip
+                )
 
                 self.host.start(databases_info)
 
                 break
             except Exception as e:
-                if str(e).find('port is already allocated') < 0:
+                if str(e).find("port is already allocated") < 0:
                     break
 
                 databases_info.reset_ports()
                 database_port = utils.find_free_port()
 
-                cmd = [x if not x.startswith('0.0.0.0:') else '0.0.0.0:%d' % database_port for x in cmd]
+                cmd = [
+                    x if not x.startswith("0.0.0.0:") else "0.0.0.0:%d" % database_port
+                    for x in cmd
+                ]
                 databases_info.command = cmd
 
         database_ip = self.host.get_ipaddress(databases_info)
@@ -237,12 +271,13 @@ class DockerExecutor(RemoteExecutor):
             configuration_path=databases_configuration_path,
             container=databases_info,
             address=database_ip,
-            port=database_port
+            port=database_port,
         )
         return retval
 
-    def process(self, virtual_memory_in_megabytes=0, max_cpu_percent=0,
-                timeout_in_minutes=0):
+    def process(
+        self, virtual_memory_in_megabytes=0, max_cpu_percent=0, timeout_in_minutes=0
+    ):
         """Executes the user algorithm code using an external program.
 
         The execution interface follows the backend API as described in our
@@ -288,17 +323,22 @@ class DockerExecutor(RemoteExecutor):
         """
 
         if not self.valid:
-            raise RuntimeError("execution information is bogus:\n  * %s" % \
-                    '\n  * '.join(self.errors))
-
+            raise RuntimeError(
+                "execution information is bogus:\n  * %s" % "\n  * ".join(self.errors)
+            )
 
         # Determine the docker image to use for the processing
-        processing_environment = '%(name)s (%(version)s)' % self.data['environment']
+        processing_environment = "%(name)s (%(version)s)" % self.data["environment"]
         if processing_environment not in self.host:
-            raise RuntimeError("Environment `%s' is not available on docker " \
-                "host `%s' - available environments are %s" % (processing_environment,
-                  self.host, ", ".join(self.host.processing_environments.keys())))
-
+            raise RuntimeError(
+                "Environment `%s' is not available on docker "
+                "host `%s' - available environments are %s"
+                % (
+                    processing_environment,
+                    self.host,
+                    ", ".join(self.host.processing_environments.keys()),
+                )
+            )
 
         # Creates the message handler
         algorithm_container = None
@@ -307,88 +347,104 @@ class DockerExecutor(RemoteExecutor):
             self.host.kill(algorithm_container)
 
         address = self.host.ip
-        port_range = self.data.pop('port_range', None)
+        port_range = self.data.pop("port_range", None)
         if port_range:
-            min_port, max_port = port_range.split(':')
+            min_port, max_port = port_range.split(":")
             port = utils.find_free_port_in_range(int(min_port), int(max_port))
-            address +=  ':{}'.format(port)
+            address += ":{}".format(port)
 
         self.message_handler = MessageHandler(address, kill_callback=_kill)
 
+        # ----- (If necessary) Instantiate the docker container that provide the databases
 
-        #----- (If necessary) Instantiate the docker container that provide the databases
-
-        datasets_uid =  self.data.pop('datasets_uid', None)
-        network_name = self.data.pop('network_name', 'bridge')
+        datasets_uid = self.data.pop("datasets_uid", None)
+        network_name = self.data.pop("network_name", "bridge")
         databases_infos = {}
 
         if len(self.databases) > 0:
-            databases_infos['db'] = self.__create_db_container(datasets_uid, network_name)
-
+            databases_infos["db"] = self.__create_db_container(
+                datasets_uid, network_name
+            )
 
-        #----- Instantiate the algorithm container
+        # ----- Instantiate the algorithm container
 
         # Configuration and needed files
         configuration_path = utils.temporary_directory()
         self.dump_runner_configuration(configuration_path)
 
-
         loop_algorithm_container = None
         loop_algorithm_container_ip = None
         loop_algorithm_container_port = None
 
         if self.loop_algorithm is not None:
             if len(self.databases) > 0:
-                databases_infos['loop_db'] = self.__create_db_container(datasets_uid, network_name, "loop")
+                databases_infos["loop_db"] = self.__create_db_container(
+                    datasets_uid, network_name, "loop"
+                )
 
             loop_algorithm_container_port = utils.find_free_port()
             cmd = [
-                'loop_execute',
-                '0.0.0.0:{}'.format(loop_algorithm_container_port),
-                '/beat/prefix',
-                '/beat/cache'
+                "loop_execute",
+                "0.0.0.0:{}".format(loop_algorithm_container_port),
+                "/beat/prefix",
+                "/beat/cache",
             ]
 
             if len(self.databases) > 0:
-                cmd.append('tcp://{}:{}'.format(databases_infos['loop_db']['address'],
-                                                databases_infos['loop_db']['port']))
+                cmd.append(
+                    "tcp://{}:{}".format(
+                        databases_infos["loop_db"]["address"],
+                        databases_infos["loop_db"]["port"],
+                    )
+                )
 
             if logger.getEffectiveLevel() <= logging.DEBUG:
-                cmd.insert(1, '--debug')
+                cmd.insert(1, "--debug")
 
-            loop_algorithm_container = self.host.create_container(processing_environment, cmd)
+            loop_algorithm_container = self.host.create_container(
+                processing_environment, cmd
+            )
             loop_algorithm_container.uid = datasets_uid
             loop_algorithm_container.network_name = network_name
 
             # Volumes
-            loop_algorithm_container.add_volume(configuration_path, '/beat/prefix')
-            loop_algorithm_container.add_volume(self.cache, '/beat/cache', read_only=False)
+            loop_algorithm_container.add_volume(configuration_path, "/beat/prefix")
+            loop_algorithm_container.add_volume(
+                self.cache, "/beat/cache", read_only=False
+            )
 
             # Start the container
-            self.host.start(loop_algorithm_container,
-                            virtual_memory_in_megabytes=virtual_memory_in_megabytes,
-                            max_cpu_percent=max_cpu_percent
+            self.host.start(
+                loop_algorithm_container,
+                virtual_memory_in_megabytes=virtual_memory_in_megabytes,
+                max_cpu_percent=max_cpu_percent,
+            )
+            loop_algorithm_container_ip = self.host.get_ipaddress(
+                loop_algorithm_container
             )
-            loop_algorithm_container_ip = self.host.get_ipaddress(loop_algorithm_container)
 
         # Command to execute
         cmd = [
-            'execute',
-            '--cache=/beat/cache',
+            "execute",
+            "--cache=/beat/cache",
             self.message_handler.address,
-            '/beat/prefix'
+            "/beat/prefix",
         ]
 
         if len(self.databases) > 0:
-            cmd.append('tcp://%s:%d' % (databases_infos['db']['address'],
-                                        databases_infos['db']['port']))
+            cmd.append(
+                "tcp://%s:%d"
+                % (databases_infos["db"]["address"], databases_infos["db"]["port"])
+            )
 
         if self.loop_algorithm is not None:
-            cmd.append('tcp://%s:%d' % (loop_algorithm_container_ip,
-                                        loop_algorithm_container_port))
+            cmd.append(
+                "tcp://%s:%d"
+                % (loop_algorithm_container_ip, loop_algorithm_container_port)
+            )
 
         if logger.getEffectiveLevel() <= logging.DEBUG:
-            cmd.insert(1, '--debug')
+            cmd.insert(1, "--debug")
 
         # Creation of the container
         algorithm_container = self.host.create_container(processing_environment, cmd)
@@ -396,16 +452,16 @@ class DockerExecutor(RemoteExecutor):
         algorithm_container.network_name = network_name
 
         # Volumes
-        algorithm_container.add_volume(configuration_path, '/beat/prefix')
-        algorithm_container.add_volume(self.cache, '/beat/cache', read_only=False)
+        algorithm_container.add_volume(configuration_path, "/beat/prefix")
+        algorithm_container.add_volume(self.cache, "/beat/cache", read_only=False)
 
         # Start the container
-        self.host.start(algorithm_container,
-                        virtual_memory_in_megabytes=virtual_memory_in_megabytes,
-                        max_cpu_percent=max_cpu_percent
+        self.host.start(
+            algorithm_container,
+            virtual_memory_in_megabytes=virtual_memory_in_megabytes,
+            max_cpu_percent=max_cpu_percent,
         )
 
-
         # Process the messages until the container is done
         self.message_handler.start()
 
@@ -416,13 +472,15 @@ class DockerExecutor(RemoteExecutor):
             status = self.host.wait(algorithm_container, timeout)
 
         except requests.exceptions.ReadTimeout:
-            logger.warn("user process has timed out after %d minutes", timeout_in_minutes)
+            logger.warn(
+                "user process has timed out after %d minutes", timeout_in_minutes
+            )
             timed_out = True
 
             self.host.kill(algorithm_container)
             status = self.host.wait(algorithm_container)
 
-        except KeyboardInterrupt: # Developer pushed CTRL-C
+        except KeyboardInterrupt:  # Developer pushed CTRL-C
             logger.info("stopping user process on CTRL-C console request")
             self.host.kill(algorithm_container)
             status = self.host.wait(algorithm_container)
@@ -430,53 +488,54 @@ class DockerExecutor(RemoteExecutor):
         finally:
             for name, databases_info in databases_infos.items():
                 logger.debug("Stopping database container " + name)
-                container = databases_info['container']
+                container = databases_info["container"]
                 self.host.kill(container)
                 self.host.wait(container)
 
             self.message_handler.stop.set()
             self.message_handler.join()
 
-
         # Collects final information and returns to caller
         container_log = self.host.logs(algorithm_container)
 
         if status != 0:
-            stdout = ''
+            stdout = ""
             stderr = container_log
         else:
             stdout = container_log
-            stderr = ''
+            stderr = ""
 
         if logger.getEffectiveLevel() <= logging.DEBUG:
             logger.debug("Log of the container: " + container_log)
 
         retval = dict(
-            status = status,
-            stdout = stdout,
-            stderr = stderr,
-            timed_out = timed_out,
-            statistics = self.host.statistics(algorithm_container),
-            system_error = self.message_handler.system_error,
-            user_error = self.message_handler.user_error,
+            status=status,
+            stdout=stdout,
+            stderr=stderr,
+            timed_out=timed_out,
+            statistics=self.host.statistics(algorithm_container),
+            system_error=self.message_handler.system_error,
+            user_error=self.message_handler.user_error,
         )
 
-        retval['statistics']['data'] = self.message_handler.statistics
-        stats.update(retval['statistics']['data'], self.io_statistics)
+        retval["statistics"]["data"] = self.message_handler.statistics
+        stats.update(retval["statistics"]["data"], self.io_statistics)
 
         self.host.rm(algorithm_container)
 
         for name, databases_info in databases_infos.items():
-            container = databases_info['container']
+            container = databases_info["container"]
             db_container_log = self.host.logs(container)
 
             if logger.getEffectiveLevel() <= logging.DEBUG:
-                logger.debug("Log of the" + name + "database container: " + db_container_log)
+                logger.debug(
+                    "Log of the" + name + "database container: " + db_container_log
+                )
 
             if status != 0:
-                retval['stderr'] += '\n' + db_container_log
+                retval["stderr"] += "\n" + db_container_log
             else:
-                retval['stdout'] += '\n' + db_container_log
+                retval["stdout"] += "\n" + db_container_log
 
             self.host.rm(container)
 
@@ -488,7 +547,7 @@ class DockerExecutor(RemoteExecutor):
 
         if not self.debug:
             for _, databases_info in databases_infos.items():
-                shutil.rmtree(databases_info['configuration_path'])
+                shutil.rmtree(databases_info["configuration_path"])
             shutil.rmtree(configuration_path)
 
         return retval
diff --git a/beat/core/execution/local.py b/beat/core/execution/local.py
index 9d89943bd8937f9b400966f5ac9fa2cedf55516f..605f21e3184dce043883c5d14ee5b485c944b31f 100644
--- a/beat/core/execution/local.py
+++ b/beat/core/execution/local.py
@@ -1,29 +1,38 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2017 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
+
 
 """
 =====
@@ -42,6 +51,7 @@ import zmq
 import time
 
 import logging
+
 logger = logging.getLogger(__name__)
 
 import simplejson
@@ -151,16 +161,28 @@ class LocalExecutor(BaseExecutor):
 
     """
 
-    def __init__(self, prefix, data, cache=None, dataformat_cache=None,
-            database_cache=None, algorithm_cache=None, library_cache=None,
-            custom_root_folders=None):
-
-        super(LocalExecutor, self).__init__(prefix, data, cache=cache,
-                                            dataformat_cache=dataformat_cache,
-                                            database_cache=database_cache,
-                                            algorithm_cache=algorithm_cache,
-                                            library_cache=library_cache,
-                                            custom_root_folders=custom_root_folders)
+    def __init__(
+        self,
+        prefix,
+        data,
+        cache=None,
+        dataformat_cache=None,
+        database_cache=None,
+        algorithm_cache=None,
+        library_cache=None,
+        custom_root_folders=None,
+    ):
+
+        super(LocalExecutor, self).__init__(
+            prefix,
+            data,
+            cache=cache,
+            dataformat_cache=dataformat_cache,
+            database_cache=database_cache,
+            algorithm_cache=algorithm_cache,
+            library_cache=library_cache,
+            custom_root_folders=custom_root_folders,
+        )
 
         self.working_dir = None
         self.executor = None
@@ -173,7 +195,6 @@ class LocalExecutor(BaseExecutor):
 
         self.zmq_context = None
 
-
     def __cleanup(self):
         if self.loop_executor:
             self.loop_executor.wait()
@@ -195,9 +216,9 @@ class LocalExecutor(BaseExecutor):
         if self.working_dir is not None:
             shutil.rmtree(self.working_dir)
 
-
-    def process(self, virtual_memory_in_megabytes=0, max_cpu_percent=0,
-                timeout_in_minutes=0):
+    def process(
+        self, virtual_memory_in_megabytes=0, max_cpu_percent=0, timeout_in_minutes=0
+    ):
         """Executes the user algorithm code
 
         Parameters:
@@ -224,33 +245,30 @@ class LocalExecutor(BaseExecutor):
 
         """
 
-        def _create_result(status, error_message=''):
+        def _create_result(status, error_message=""):
             return {
-                'status': status,
-                'statistics': {
-                    'data': self.io_statistics,
-                    'cpu': {
-                        'user': 0.0,
-                        'system': 0.0,
-                        'total': 0.0,
-                        'percent': 0.0,
-                        'processors': 1,
-                    },
-                    'memory': {
-                        'rss': 0,
-                        'limit': 0,
-                        'percent': 0.0,
+                "status": status,
+                "statistics": {
+                    "data": self.io_statistics,
+                    "cpu": {
+                        "user": 0.0,
+                        "system": 0.0,
+                        "total": 0.0,
+                        "percent": 0.0,
+                        "processors": 1,
                     },
+                    "memory": {"rss": 0, "limit": 0, "percent": 0.0},
                 },
-                'stderr': '',
-                'stdout': '',
-                'system_error': '',
-                'user_error': error_message,
-                'timed_out': False
+                "stderr": "",
+                "stdout": "",
+                "system_error": "",
+                "user_error": error_message,
+                "timed_out": False,
             }
 
         def _process_exception(exception, prefix, contribution_kind):
             import traceback
+
             exc_type, exc_value, exc_traceback = sys.exc_info()
             tb = traceback.extract_tb(exc_traceback)
 
@@ -263,17 +281,17 @@ class LocalExecutor(BaseExecutor):
             if first_line == len(tb):
                 first_line = 0
 
-            s = ''.join(traceback.format_list(tb[first_line:]))
-            s = s.replace(contributions_prefix, '').strip()
+            s = "".join(traceback.format_list(tb[first_line:]))
+            s = s.replace(contributions_prefix, "").strip()
 
             return "%s\n%s: %s" % (s, type(exception).__name__, exception)
 
-
         if not self.valid:
-            raise RuntimeError("execution information is bogus:\n  * %s" % \
-                    '\n  * '.join(self.errors))
+            raise RuntimeError(
+                "execution information is bogus:\n  * %s" % "\n  * ".join(self.errors)
+            )
 
-        self.message_handler = MessageHandler('127.0.0.1')
+        self.message_handler = MessageHandler("127.0.0.1")
         self.message_handler.start()
 
         self.zmq_context = zmq.Context()
@@ -281,21 +299,23 @@ class LocalExecutor(BaseExecutor):
         self.executor_socket.connect(self.message_handler.address)
 
         self.working_dir = tempfile.mkdtemp(prefix=__name__)
-        working_prefix = os.path.join(self.working_dir, 'prefix')
+        working_prefix = os.path.join(self.working_dir, "prefix")
 
         self.dump_runner_configuration(self.working_dir)
         self.algorithm.export(working_prefix)
 
         if self.loop_algorithm:
             self.loop_algorithm.export(working_prefix)
-            self.loop_message_handler = LoopMessageHandler('127.0.0.1')
+            self.loop_message_handler = LoopMessageHandler("127.0.0.1")
             self.loop_socket = self.zmq_context.socket(zmq.PAIR)
             self.loop_socket.connect(self.loop_message_handler.address)
 
-            self.loop_executor = LoopExecutor(self.loop_message_handler,
-                                              self.working_dir,
-                                              database_cache=self.databases,
-                                              cache_root=self.cache)
+            self.loop_executor = LoopExecutor(
+                self.loop_message_handler,
+                self.working_dir,
+                database_cache=self.databases,
+                cache_root=self.cache,
+            )
 
             retval = self.loop_executor.setup()
             if not retval:
@@ -309,11 +329,13 @@ class LocalExecutor(BaseExecutor):
 
             self.loop_executor.process()
 
-        self.executor = AlgorithmExecutor(self.executor_socket,
-                                          self.working_dir,
-                                          database_cache=self.databases,
-                                          cache_root=self.cache,
-                                          loop_socket=self.loop_socket)
+        self.executor = AlgorithmExecutor(
+            self.executor_socket,
+            self.working_dir,
+            database_cache=self.databases,
+            cache_root=self.cache,
+            loop_socket=self.loop_socket,
+        )
 
         retval = self.executor.setup()
         if not retval:
@@ -330,7 +352,7 @@ class LocalExecutor(BaseExecutor):
         try:
             processed = self.executor.process()
         except Exception as e:
-            message = _process_exception(e, self.prefix, 'databases')
+            message = _process_exception(e, self.prefix, "databases")
             self.__cleanup()
             return _create_result(1, message)
 
@@ -341,7 +363,7 @@ class LocalExecutor(BaseExecutor):
         proc_time = time.time() - _start
 
         # some local information
-        logger.debug("Total processing time was %.3f seconds" , proc_time)
+        logger.debug("Total processing time was %.3f seconds", proc_time)
 
         self.__cleanup()
 
diff --git a/beat/core/execution/remote.py b/beat/core/execution/remote.py
index 291a9039173e49381566e47809ea171815e518be..f634865f914c1ad4a32a400251037a0a6d7ecdc0 100644
--- a/beat/core/execution/remote.py
+++ b/beat/core/execution/remote.py
@@ -1,29 +1,37 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
 
 
 """
@@ -37,6 +45,7 @@ Execution utilities
 import zmq
 
 import logging
+
 logger = logging.getLogger(__name__)
 
 from .base import BaseExecutor
@@ -129,22 +138,34 @@ class RemoteExecutor(BaseExecutor):
 
     """
 
-    def __init__(self, prefix, data, ip_address, cache=None, dataformat_cache=None,
-                 database_cache=None, algorithm_cache=None, library_cache=None,
-                 custom_root_folders=None):
-
-        super(RemoteExecutor, self).__init__(prefix, data, cache=cache,
-                                             dataformat_cache=dataformat_cache,
-                                             database_cache=database_cache,
-                                             algorithm_cache=algorithm_cache,
-                                             library_cache=library_cache,
-                                             custom_root_folders=custom_root_folders)
+    def __init__(
+        self,
+        prefix,
+        data,
+        ip_address,
+        cache=None,
+        dataformat_cache=None,
+        database_cache=None,
+        algorithm_cache=None,
+        library_cache=None,
+        custom_root_folders=None,
+    ):
+
+        super(RemoteExecutor, self).__init__(
+            prefix,
+            data,
+            cache=cache,
+            dataformat_cache=dataformat_cache,
+            database_cache=database_cache,
+            algorithm_cache=algorithm_cache,
+            library_cache=library_cache,
+            custom_root_folders=custom_root_folders,
+        )
 
         # Initialisations
         self.ip_address = ip_address
         self.message_handler = None
 
-
     def _prepare_inputs(self):
         """Prepares all input required by the execution."""
 
@@ -152,16 +173,18 @@ class RemoteExecutor(BaseExecutor):
             self.data, self.algorithm, self.prefix, self.cache
         )
 
-
     def _prepare_outputs(self):
         """Prepares all output required by the execution."""
 
         (self.output_list, self.data_sinks) = create_outputs_from_configuration(
-            self.data, self.algorithm, self.prefix, self.cache,
-            input_list=self.input_list, data_loaders=self.data_loaders
+            self.data,
+            self.algorithm,
+            self.prefix,
+            self.cache,
+            input_list=self.input_list,
+            data_loaders=self.data_loaders,
         )
 
-
     def kill(self):
         """Stops the user process by force - to be called from signal handlers"""
 
diff --git a/beat/core/execution/subprocess.py b/beat/core/execution/subprocess.py
index e72cd97671ca03fe6e2e4817148f062971fb9132..b5b6d4201bf107efc6bfbca6f222dd923297e02f 100644
--- a/beat/core/execution/subprocess.py
+++ b/beat/core/execution/subprocess.py
@@ -1,29 +1,36 @@
-
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
 
 
 """
@@ -55,20 +62,23 @@ from .remote import RemoteExecutor
 
 logger = logging.getLogger(__name__)
 
+
 def _which(program):
-  '''Pythonic version of the `which` command-line application'''
+    """Pythonic version of the `which` command-line application"""
 
-  def is_exe(fpath):
-    return os.path.isfile(fpath) and os.access(fpath, os.X_OK)
+    def is_exe(fpath):
+        return os.path.isfile(fpath) and os.access(fpath, os.X_OK)
 
-  fpath, fname = os.path.split(program)
-  if fpath and is_exe(program): return program
-  else:
-    for path in os.environ["PATH"].split(os.pathsep):
-      exe_file = os.path.join(path, fname)
-      if is_exe(exe_file): return exe_file
+    fpath, fname = os.path.split(program)
+    if fpath and is_exe(program):
+        return program
+    else:
+        for path in os.environ["PATH"].split(os.pathsep):
+            exe_file = os.path.join(path, fname)
+            if is_exe(exe_file):
+                return exe_file
 
-  return None
+    return None
 
 
 class SubprocessExecutor(RemoteExecutor):
@@ -155,25 +165,39 @@ class SubprocessExecutor(RemoteExecutor):
 
     """
 
-    def __init__(self, prefix, data, cache=None, dataformat_cache=None,
-                 database_cache=None, algorithm_cache=None, library_cache=None,
-                 custom_root_folders=None, ip_address='127.0.0.1'):
-
-        super(SubprocessExecutor, self).__init__(prefix, data, ip_address, cache=cache,
-                                                 dataformat_cache=dataformat_cache,
-                                                 database_cache=database_cache,
-                                                 algorithm_cache=algorithm_cache,
-                                                 library_cache=library_cache,
-                                                 custom_root_folders=custom_root_folders)
+    def __init__(
+        self,
+        prefix,
+        data,
+        cache=None,
+        dataformat_cache=None,
+        database_cache=None,
+        algorithm_cache=None,
+        library_cache=None,
+        custom_root_folders=None,
+        ip_address="127.0.0.1",
+    ):
+
+        super(SubprocessExecutor, self).__init__(
+            prefix,
+            data,
+            ip_address,
+            cache=cache,
+            dataformat_cache=dataformat_cache,
+            database_cache=database_cache,
+            algorithm_cache=algorithm_cache,
+            library_cache=library_cache,
+            custom_root_folders=custom_root_folders,
+        )
 
         # We need three apps to run this function: databases_provider and execute
-        self.EXECUTE_BIN = _which(os.path.join(os.path.dirname(sys.argv[0]),
-            'execute'))
-        self.LOOP_EXECUTE_BIN = _which(os.path.join(os.path.dirname(sys.argv[0]),
-            'loop_execute'))
-        self.DBPROVIDER_BIN = _which(os.path.join(os.path.dirname(sys.argv[0]),
-            'databases_provider'))
-
+        self.EXECUTE_BIN = _which(os.path.join(os.path.dirname(sys.argv[0]), "execute"))
+        self.LOOP_EXECUTE_BIN = _which(
+            os.path.join(os.path.dirname(sys.argv[0]), "loop_execute")
+        )
+        self.DBPROVIDER_BIN = _which(
+            os.path.join(os.path.dirname(sys.argv[0]), "databases_provider")
+        )
 
     def __create_db_process(self, configuration_name=None):
         databases_process = None
@@ -191,13 +215,13 @@ class SubprocessExecutor(RemoteExecutor):
 
         cmd = [
             self.DBPROVIDER_BIN,
-            self.ip_address + (':%d' % database_port),
+            self.ip_address + (":%d" % database_port),
             databases_configuration_path,
             self.cache,
         ]
 
         if logger.getEffectiveLevel() <= logging.DEBUG:
-            cmd.insert(1, '--debug')
+            cmd.insert(1, "--debug")
 
         if configuration_name is not None:
             cmd.append(configuration_name)
@@ -207,22 +231,22 @@ class SubprocessExecutor(RemoteExecutor):
 
         logger.debug("Starting database process with: %s" % " ".join(cmd))
 
-        databases_process = sp.Popen(cmd,
-                                     stdout=databases_process_stdout,
-                                     stderr=databases_process_stderr)
+        databases_process = sp.Popen(
+            cmd, stdout=databases_process_stdout, stderr=databases_process_stderr
+        )
 
         retval = dict(
             configuration_path=databases_configuration_path,
             process=databases_process,
             port=database_port,
             stdout=databases_process_stdout,
-            stderr=databases_process_stderr
+            stderr=databases_process_stderr,
         )
         return retval
 
-
-    def process(self, virtual_memory_in_megabytes=0, max_cpu_percent=0,
-                timeout_in_minutes=0):
+    def process(
+        self, virtual_memory_in_megabytes=0, max_cpu_percent=0, timeout_in_minutes=0
+    ):
         """Executes the user algorithm code using an external program.
 
         The execution interface follows the backend API as described in our
@@ -266,24 +290,25 @@ class SubprocessExecutor(RemoteExecutor):
         """
 
         if not self.valid:
-            raise RuntimeError("execution information is bogus:\n  * %s" % \
-                    '\n  * '.join(self.errors))
-
+            raise RuntimeError(
+                "execution information is bogus:\n  * %s" % "\n  * ".join(self.errors)
+            )
 
         missing_scripts = []
         if (len(self.databases) > 0) and self.DBPROVIDER_BIN is None:
-            missing_scripts.append('databases_provider')
+            missing_scripts.append("databases_provider")
 
         if self.EXECUTE_BIN is None:
-            missing_scripts.append('execute')
+            missing_scripts.append("execute")
 
         if self.LOOP_EXECUTE_BIN is None:
-            missing_scripts.append('loop_execute')
+            missing_scripts.append("loop_execute")
 
         if missing_scripts:
-            raise RuntimeError("Scripts not found at PATH (%s): %s" % \
-                (os.environ.get('PATH', ''), ', '.join(missing_scripts)))
-
+            raise RuntimeError(
+                "Scripts not found at PATH (%s): %s"
+                % (os.environ.get("PATH", ""), ", ".join(missing_scripts))
+            )
 
         # Creates the message handler
         algorithm_process = None
@@ -291,17 +316,14 @@ class SubprocessExecutor(RemoteExecutor):
         def _kill():
             algorithm_process.terminate()
 
-        self.message_handler = MessageHandler(self.ip_address,
-                                              kill_callback=_kill)
+        self.message_handler = MessageHandler(self.ip_address, kill_callback=_kill)
 
-
-        #----- (If necessary) Instantiate the subprocess that provide the databases
+        # ----- (If necessary) Instantiate the subprocess that provide the databases
 
         database_infos = {}
 
         if len(self.databases) > 0:
-            database_infos['db'] = self.__create_db_process()
-
+            database_infos["db"] = self.__create_db_process()
 
         # Configuration and needed files
         configuration_path = utils.temporary_directory()
@@ -309,27 +331,31 @@ class SubprocessExecutor(RemoteExecutor):
 
         # import ipdb;ipdb.set_trace()
 
-        #----- Instantiate the algorithm subprocess
+        # ----- Instantiate the algorithm subprocess
         loop_algorithm_port = None
         loop_algorithm_process = None
 
         if self.loop_algorithm is not None:
             if len(self.databases) > 0:
-                database_infos['loop_db'] = self.__create_db_process("loop")
+                database_infos["loop_db"] = self.__create_db_process("loop")
 
             loop_algorithm_port = utils.find_free_port()
             cmd = [
                 self.LOOP_EXECUTE_BIN,
-                self.ip_address + (':%d' % loop_algorithm_port),
+                self.ip_address + (":%d" % loop_algorithm_port),
                 configuration_path,
-                self.cache
+                self.cache,
             ]
 
             if len(self.databases) > 0:
-                cmd.append('tcp://' + self.ip_address + (':%d' % database_infos['loop_db']['port']))
+                cmd.append(
+                    "tcp://"
+                    + self.ip_address
+                    + (":%d" % database_infos["loop_db"]["port"])
+                )
 
             if logger.getEffectiveLevel() <= logging.DEBUG:
-                cmd.insert(1, '--debug')
+                cmd.insert(1, "--debug")
 
             # Creation of the container
             loop_algorithm_process_stdout = tempfile.NamedTemporaryFile(delete=False)
@@ -337,32 +363,35 @@ class SubprocessExecutor(RemoteExecutor):
 
             logger.debug("Starting loop process with: %s" % " ".join(cmd))
 
-            loop_algorithm_process = sp.Popen(cmd,
-                                              stdout=loop_algorithm_process_stdout,
-                                              stderr=loop_algorithm_process_stderr)
-
+            loop_algorithm_process = sp.Popen(
+                cmd,
+                stdout=loop_algorithm_process_stdout,
+                stderr=loop_algorithm_process_stderr,
+            )
 
             # Process the messages until the subprocess is done
             # self.loop_message_handler.start()
 
-        #----- Instantiate the algorithms subprocess
+        # ----- Instantiate the algorithms subprocess
 
         # Command to execute
         cmd = [
             self.EXECUTE_BIN,
-            '--cache=%s' % self.cache,
+            "--cache=%s" % self.cache,
             self.message_handler.address,
             configuration_path,
         ]
 
         if len(self.databases) > 0:
-            cmd.append('tcp://' + self.ip_address + (':%d' % database_infos['db']['port']))
+            cmd.append(
+                "tcp://" + self.ip_address + (":%d" % database_infos["db"]["port"])
+            )
 
         if self.loop_algorithm is not None:
-            cmd.append('tcp://' + self.ip_address + (':%d' % loop_algorithm_port))
+            cmd.append("tcp://" + self.ip_address + (":%d" % loop_algorithm_port))
 
         if logger.getEffectiveLevel() <= logging.DEBUG:
-            cmd.insert(1, '--debug')
+            cmd.insert(1, "--debug")
 
         # Creation of the container
         algorithm_process_stdout = tempfile.NamedTemporaryFile(delete=False)
@@ -370,10 +399,9 @@ class SubprocessExecutor(RemoteExecutor):
 
         logger.debug("Starting algorithm process with: %s" % " ".join(cmd))
 
-        algorithm_process = sp.Popen(cmd,
-                                     stdout=algorithm_process_stdout,
-                                     stderr=algorithm_process_stderr)
-
+        algorithm_process = sp.Popen(
+            cmd, stdout=algorithm_process_stdout, stderr=algorithm_process_stderr
+        )
 
         # Process the messages until the subprocess is done
         self.message_handler.start()
@@ -382,7 +410,7 @@ class SubprocessExecutor(RemoteExecutor):
             algorithm_process.communicate()
             status = algorithm_process.returncode
 
-        except KeyboardInterrupt: # Developer pushed CTRL-C
+        except KeyboardInterrupt:  # Developer pushed CTRL-C
             logger.info("stopping user process on CTRL-C console request")
             algorithm_process.kill()
             status = algorithm_process.wait()
@@ -394,56 +422,51 @@ class SubprocessExecutor(RemoteExecutor):
         finally:
             self.message_handler.stop.set()
 
-
         # Collects final information and returns to caller
-        with open(algorithm_process_stdout.name, 'r') as f:
+        with open(algorithm_process_stdout.name, "r") as f:
             stdout = f.read()
 
-        stderr = ''
+        stderr = ""
         if status != 0:
-            with open(algorithm_process_stderr.name, 'r') as f:
+            with open(algorithm_process_stderr.name, "r") as f:
                 stderr = f.read()
 
         retval = dict(
-            status = status,
-            stdout = stdout,
-            stderr = stderr,
-            timed_out = False,
-            statistics = {
-                    'data': self.message_handler.statistics,
-                    'cpu': {
-                        'user': 0.0,
-                        'system': 0.0,
-                        'total': 0.0,
-                        'percent': 0.0,
-                        'processors': 1,
-                    },
-                    'memory': {
-                        'rss': 0,
-                        'limit': 0,
-                        'percent': 0.0,
-                    },
+            status=status,
+            stdout=stdout,
+            stderr=stderr,
+            timed_out=False,
+            statistics={
+                "data": self.message_handler.statistics,
+                "cpu": {
+                    "user": 0.0,
+                    "system": 0.0,
+                    "total": 0.0,
+                    "percent": 0.0,
+                    "processors": 1,
                 },
-            system_error = self.message_handler.system_error,
-            user_error = self.message_handler.user_error,
+                "memory": {"rss": 0, "limit": 0, "percent": 0.0},
+            },
+            system_error=self.message_handler.system_error,
+            user_error=self.message_handler.user_error,
         )
 
-        stats.update(retval['statistics']['data'], self.io_statistics)
+        stats.update(retval["statistics"]["data"], self.io_statistics)
 
         for name, db_info in database_infos.items():
             logger.debug("Stopping %s process" % name)
-            databases_process = db_info['process']
+            databases_process = db_info["process"]
 
             databases_process.terminate()
             databases_process.communicate()
             status = databases_process.returncode
 
-            with open(db_info['stdout'].name, 'r') as f:
-                retval['stdout'] += '\n' + f.read()
+            with open(db_info["stdout"].name, "r") as f:
+                retval["stdout"] += "\n" + f.read()
 
             if status != 0:
-                with open(db_info['stderr'].name, 'r') as f:
-                    retval['stderr'] += '\n' + f.read()
+                with open(db_info["stderr"].name, "r") as f:
+                    retval["stderr"] += "\n" + f.read()
 
         if loop_algorithm_process is not None:
             logger.debug("Stopping loop process")
@@ -451,19 +474,19 @@ class SubprocessExecutor(RemoteExecutor):
             loop_algorithm_process.communicate()
             status = loop_algorithm_process.returncode
 
-            with open(loop_algorithm_process_stdout.name, 'r') as f:
-                retval['stdout'] += '\n' + f.read()
+            with open(loop_algorithm_process_stdout.name, "r") as f:
+                retval["stdout"] += "\n" + f.read()
 
             if status != 0:
-                with open(loop_algorithm_process_stderr.name, 'r') as f:
-                    retval['stderr'] += '\n' + f.read()
+                with open(loop_algorithm_process_stderr.name, "r") as f:
+                    retval["stderr"] += "\n" + f.read()
 
         self.message_handler.destroy()
         self.message_handler = None
 
         if not self.debug:
             for _, db_info in database_infos.items():
-                shutil.rmtree(db_info['configuration_path'])
+                shutil.rmtree(db_info["configuration_path"])
             shutil.rmtree(configuration_path)
 
         return retval
diff --git a/beat/core/experiment.py b/beat/core/experiment.py
index 2e3bc9ac2fa36e0fd57ed84089d3ca5ac6ff5e5d..1f6690c223b3a2a1fedcabd31ace0173003c3ca1 100644
--- a/beat/core/experiment.py
+++ b/beat/core/experiment.py
@@ -1,29 +1,37 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
 
 
 """
@@ -70,14 +78,17 @@ class Storage(utils.Storage):
         if len(s) == 4:
             name = os.path.join(s[0], name)
 
-        self.username, self.toolchain_username, self.toolchain, self.version, self.name = \
-                name.split(os.sep)
+        self.username, self.toolchain_username, self.toolchain, self.version, self.name = name.split(
+            os.sep
+        )
 
         self.label = name
-        self.toolchain = os.path.join(self.toolchain_username, self.toolchain, self.version)
+        self.toolchain = os.path.join(
+            self.toolchain_username, self.toolchain, self.version
+        )
         self.prefix = prefix
 
-        path = utils.hashed_or_simple(self.prefix, 'experiments', name, suffix='.json')
+        path = utils.hashed_or_simple(self.prefix, "experiments", name, suffix=".json")
         path = path[:-5]
 
         super(Storage, self).__init__(path)
@@ -171,8 +182,15 @@ class Experiment(object):
         decoder.
     """
 
-    def __init__(self, prefix, data, dataformat_cache=None, database_cache=None,
-            algorithm_cache=None, library_cache=None):
+    def __init__(
+        self,
+        prefix,
+        data,
+        dataformat_cache=None,
+        database_cache=None,
+        algorithm_cache=None,
+        library_cache=None,
+    ):
 
         self.prefix = prefix
 
@@ -197,11 +215,13 @@ class Experiment(object):
         algorithm_cache = algorithm_cache if algorithm_cache is not None else {}
         library_cache = library_cache if library_cache is not None else {}
 
-        self._load(data, database_cache, dataformat_cache, algorithm_cache,
-                library_cache)
+        self._load(
+            data, database_cache, dataformat_cache, algorithm_cache, library_cache
+        )
 
-    def _load(self, data, database_cache, dataformat_cache, algorithm_cache,
-            library_cache):
+    def _load(
+        self, data, database_cache, dataformat_cache, algorithm_cache, library_cache
+    ):
         """Loads the experiment"""
 
         self._label = None
@@ -210,9 +230,9 @@ class Experiment(object):
 
         if data is None:  # loads prototype and validates it
 
-            experiment_data, self.errors = prototypes.load('experiment')
+            experiment_data, self.errors = prototypes.load("experiment")
             assert not self.errors, "\n  * %s" % "\n  *".join(self.errors)
-            toolchain_data, self.errors = prototypes.load('toolchain')
+            toolchain_data, self.errors = prototypes.load("toolchain")
             assert not self.errors, "\n  * %s" % "\n  *".join(self.errors)
 
         elif isinstance(data, (tuple, list)):  # the user has passed a tuple
@@ -226,12 +246,13 @@ class Experiment(object):
             experiment_data = self.storage.json.path
             toolchain_data = self.storage.toolchain
             if not self.storage.exists():
-                self.errors.append('Experiment declaration file not found: %s' % data)
+                self.errors.append("Experiment declaration file not found: %s" % data)
                 return
 
         # this runs basic validation, including JSON loading if required
-        self.data, self.errors = schema.validate('experiment', experiment_data)
-        if self.errors: return  # don't proceed with the rest of validation
+        self.data, self.errors = schema.validate("experiment", experiment_data)
+        if self.errors:
+            return  # don't proceed with the rest of validation
 
         # checks all internal aspects of the experiment
         self._check_datasets(database_cache, dataformat_cache)
@@ -240,30 +261,35 @@ class Experiment(object):
         self._check_analyzers(algorithm_cache, dataformat_cache, library_cache)
         self._check_global_parameters()
         self._load_toolchain(toolchain_data)
-        if self.errors: return  # stop, if up to here there were problems
+        if self.errors:
+            return  # stop, if up to here there were problems
 
         # cross-checks all aspects of the experiment against related toolchain
         self._crosscheck_toolchain_datasets()
-        if self.errors: return
+        if self.errors:
+            return
 
         self._crosscheck_toolchain_blocks()
-        if self.errors: return
+        if self.errors:
+            return
 
         self._crosscheck_toolchain_analyzers()
-        if self.errors: return
+        if self.errors:
+            return
 
         self._crosscheck_connection_dataformats(dataformat_cache)
-        if self.errors: return
+        if self.errors:
+            return
 
         self._crosscheck_block_algorithm_pertinence()
 
     def _check_datasets(self, database_cache, dataformat_cache):
         """checks all datasets are valid"""
 
-        for dataset, properties in self.data['datasets'].items():
+        for dataset, properties in self.data["datasets"].items():
 
             # loads the database
-            dbname = properties['database']
+            dbname = properties["database"]
             if dbname not in self.databases:
 
                 # load database
@@ -275,227 +301,294 @@ class Experiment(object):
 
                 self.databases[dbname] = db
                 if db.errors:
-                    self.errors.append("/datasets/%s: database `%s' is invalid" % \
-                            (dataset, dbname))
+                    self.errors.append(
+                        "/datasets/%s: database `%s' is invalid" % (dataset, dbname)
+                    )
                     continue
             else:
                 db = self.databases[dbname]  # take a loaded value
-                if db.errors: continue  # already done
+                if db.errors:
+                    continue  # already done
 
             # checks that the referred protocol is there
-            protoname = properties['protocol']
+            protoname = properties["protocol"]
             if protoname not in db.protocols:
-                self.errors.append("/datasets/%s: cannot find protocol `%s' on " \
-                        "database `%s' - valid protocols are %s" % \
-                        (dataset, protoname, dbname,
-                            ', '.join(db.protocols.keys())))
+                self.errors.append(
+                    "/datasets/%s: cannot find protocol `%s' on "
+                    "database `%s' - valid protocols are %s"
+                    % (dataset, protoname, dbname, ", ".join(db.protocols.keys()))
+                )
                 continue
 
             # finally, check if the referred set is inside the protocol
-            setname = properties['set']
+            setname = properties["set"]
             if setname not in db.sets(protoname):
-                self.errors.append("/datasets/%s: cannot find set `%s' on " \
-                        "protocol `%s' from database `%s' - valid set names " \
-                        "are %s" % (dataset, setname, protoname, dbname,
-                            ', '.join(db.sets(protoname).keys())))
+                self.errors.append(
+                    "/datasets/%s: cannot find set `%s' on "
+                    "protocol `%s' from database `%s' - valid set names "
+                    "are %s"
+                    % (
+                        dataset,
+                        setname,
+                        protoname,
+                        dbname,
+                        ", ".join(db.sets(protoname).keys()),
+                    )
+                )
                 continue
 
             # if you get to this point, then adds the set to our cache
-            self.datasets[dataset] = dict(
-                    database=db,
-                    protocol=protoname,
-                    set=setname,
-                    )
+            self.datasets[dataset] = dict(database=db, protocol=protoname, set=setname)
 
     def _check_blocks(self, algorithm_cache, dataformat_cache, library_cache):
         """checks all blocks are valid"""
 
-        for blockname, block in self.data['blocks'].items():
+        for blockname, block in self.data["blocks"].items():
 
-            algoname = block['algorithm']
+            algoname = block["algorithm"]
             if algoname not in self.algorithms:
 
                 # loads the algorithm
                 if algoname in algorithm_cache:
                     thisalgo = algorithm_cache[algoname]
                 else:
-                    thisalgo = algorithm.Algorithm(self.prefix, algoname,
-                                                   dataformat_cache, library_cache)
+                    thisalgo = algorithm.Algorithm(
+                        self.prefix, algoname, dataformat_cache, library_cache
+                    )
                     algorithm_cache[algoname] = thisalgo
 
                 self.algorithms[algoname] = thisalgo
                 if thisalgo.errors:
-                    self.errors.append("/blocks/%s: algorithm `%s' is invalid: %s" % \
-                            (blockname, algoname, "\n".join(thisalgo.errors)))
+                    self.errors.append(
+                        "/blocks/%s: algorithm `%s' is invalid: %s"
+                        % (blockname, algoname, "\n".join(thisalgo.errors))
+                    )
             else:
                 thisalgo = self.algorithms[algoname]
-                if thisalgo.errors: continue  # already done
+                if thisalgo.errors:
+                    continue  # already done
 
             # checks all inputs correspond
-            for algoin, blockin in block['inputs'].items():
-                if hasattr(thisalgo,'input_map') and algoin not in thisalgo.input_map:
-                    self.errors.append("/blocks/%s/inputs/%s: algorithm `%s' does not " \
-                            "have an input named `%s' - valid algorithm inputs are %s" % \
-                            (blockname, blockin, algoname, algoin,
-                                ", ".join(thisalgo.input_map.keys())))
+            for algoin, blockin in block["inputs"].items():
+                if hasattr(thisalgo, "input_map") and algoin not in thisalgo.input_map:
+                    self.errors.append(
+                        "/blocks/%s/inputs/%s: algorithm `%s' does not "
+                        "have an input named `%s' - valid algorithm inputs are %s"
+                        % (
+                            blockname,
+                            blockin,
+                            algoname,
+                            algoin,
+                            ", ".join(thisalgo.input_map.keys()),
+                        )
+                    )
 
             # checks all outputs correspond
-            for algout, blockout in block['outputs'].items():
-                if hasattr(thisalgo,'output_map') and algout not in thisalgo.output_map:
-                    self.errors.append("/blocks/%s/outputs/%s: algorithm `%s' does not " \
-                            "have an output named `%s' - valid algorithm outputs are " \
-                            "%s" % (blockname, blockout, algoname, algout,
-                                ", ".join(thisalgo.output_map.keys())))
+            for algout, blockout in block["outputs"].items():
+                if (
+                    hasattr(thisalgo, "output_map")
+                    and algout not in thisalgo.output_map
+                ):
+                    self.errors.append(
+                        "/blocks/%s/outputs/%s: algorithm `%s' does not "
+                        "have an output named `%s' - valid algorithm outputs are "
+                        "%s"
+                        % (
+                            blockname,
+                            blockout,
+                            algoname,
+                            algout,
+                            ", ".join(thisalgo.output_map.keys()),
+                        )
+                    )
 
             # checks if parallelization make sense
-            if block.get('nb_slots', 1) > 1 and not thisalgo.splittable:
-                self.errors.append("/blocks/%s/nb_slots: you have set the number of " \
-                        "slots for algorithm `%s' to %d, but it is not splittable" % \
-                        (blockname, thisalgo.name, block['nb_slots']))
+            if block.get("nb_slots", 1) > 1 and not thisalgo.splittable:
+                self.errors.append(
+                    "/blocks/%s/nb_slots: you have set the number of "
+                    "slots for algorithm `%s' to %d, but it is not splittable"
+                    % (blockname, thisalgo.name, block["nb_slots"])
+                )
 
             # check parameter consistence
-            for parameter, value in block.get('parameters', {}).items():
+            for parameter, value in block.get("parameters", {}).items():
                 try:
                     thisalgo.clean_parameter(parameter, value)
                 except Exception as e:
-                    self.errors.append("/blocks/%s/parameters/%s: cannot convert " \
-                            "value `%s' to required type: %s" % \
-                            (blockname, parameter, value, e))
+                    self.errors.append(
+                        "/blocks/%s/parameters/%s: cannot convert "
+                        "value `%s' to required type: %s"
+                        % (blockname, parameter, value, e)
+                    )
 
             self.blocks[blockname] = block
 
     def _check_loops(self, algorithm_cache, dataformat_cache, library_cache):
         """checks all loops are valid"""
 
-        if 'loops' not in self.data:
+        if "loops" not in self.data:
             return
 
-        for loopname, loop in self.data['loops'].items():
+        for loopname, loop in self.data["loops"].items():
 
-            algoname = loop['algorithm']
+            algoname = loop["algorithm"]
             if algoname not in self.algorithms:
 
                 # loads the algorithm
                 if algoname in algorithm_cache:
                     thisalgo = algorithm_cache[algoname]
                 else:
-                    thisalgo = algorithm.Algorithm(self.prefix,
-                                                   algoname,
-                                                   dataformat_cache,
-                                                   library_cache)
+                    thisalgo = algorithm.Algorithm(
+                        self.prefix, algoname, dataformat_cache, library_cache
+                    )
                     algorithm_cache[algoname] = thisalgo
 
                 self.algorithms[algoname] = thisalgo
                 if thisalgo.errors:
-                    self.errors.append("/loops/%s: algorithm `%s' is invalid:\n%s" % \
-                            (loopname, algoname, "\n".join(thisalgo.errors)))
+                    self.errors.append(
+                        "/loops/%s: algorithm `%s' is invalid:\n%s"
+                        % (loopname, algoname, "\n".join(thisalgo.errors))
+                    )
                     continue
 
             else:
                 thisalgo = self.algorithms[algoname]
-                if thisalgo.errors: continue  # already done
+                if thisalgo.errors:
+                    continue  # already done
 
             # checks all inputs correspond
-            for algoin, loop_input in loop['inputs'].items():
+            for algoin, loop_input in loop["inputs"].items():
                 if algoin not in thisalgo.input_map:
-                    self.errors.append("/analyzers/%s/inputs/%s: algorithm `%s' does " \
-                            "not have an input named `%s' - valid algorithm inputs " \
-                            "are %s" % (loopname, loop_input, algoname, algoin,
-                                ", ".join(thisalgo.input_map.keys())))
+                    self.errors.append(
+                        "/analyzers/%s/inputs/%s: algorithm `%s' does "
+                        "not have an input named `%s' - valid algorithm inputs "
+                        "are %s"
+                        % (
+                            loopname,
+                            loop_input,
+                            algoname,
+                            algoin,
+                            ", ".join(thisalgo.input_map.keys()),
+                        )
+                    )
 
             # checks if parallelization makes sense
-            if loop.get('nb_slots', 1) > 1 and not thisalgo.splittable:
-                self.errors.append("/loop/%s/nb_slots: you have set the number " \
-                        "of slots for algorithm `%s' to %d, but it is not " \
-                        "splittable" % (analyzername, thisalgo.name,
-                            loop['nb_slots']))
+            if loop.get("nb_slots", 1) > 1 and not thisalgo.splittable:
+                self.errors.append(
+                    "/loop/%s/nb_slots: you have set the number "
+                    "of slots for algorithm `%s' to %d, but it is not "
+                    "splittable" % (analyzername, thisalgo.name, loop["nb_slots"])
+                )
 
             # check parameter consistence
-            for parameter, value in loop.get('parameters', {}).items():
+            for parameter, value in loop.get("parameters", {}).items():
                 try:
                     thisalgo.clean_parameter(parameter, value)
                 except Exception as e:
-                    self.errors.append("/loop/%s/parameters/%s: cannot convert " \
-                            "value `%s' to required type: %s" % \
-                            (loopname, parameter, value, e))
+                    self.errors.append(
+                        "/loop/%s/parameters/%s: cannot convert "
+                        "value `%s' to required type: %s"
+                        % (loopname, parameter, value, e)
+                    )
 
             self.loops[loopname] = loop
 
     def _check_analyzers(self, algorithm_cache, dataformat_cache, library_cache):
         """checks all analyzers are valid"""
 
-        for analyzername, analyzer in self.data['analyzers'].items():
+        for analyzername, analyzer in self.data["analyzers"].items():
 
-            algoname = analyzer['algorithm']
+            algoname = analyzer["algorithm"]
             if algoname not in self.algorithms:
 
                 # loads the algorithm
                 if algoname in algorithm_cache:
                     thisalgo = algorithm_cache[algoname]
                 else:
-                    thisalgo = algorithm.Algorithm(self.prefix,algoname,dataformat_cache,
-                            library_cache)
+                    thisalgo = algorithm.Algorithm(
+                        self.prefix, algoname, dataformat_cache, library_cache
+                    )
                     algorithm_cache[algoname] = thisalgo
 
                 self.algorithms[algoname] = thisalgo
                 if thisalgo.errors:
-                    self.errors.append("/analyzers/%s: algorithm `%s' is invalid:\n%s" % \
-                            (analyzername, algoname, "\n".join(thisalgo.errors)))
+                    self.errors.append(
+                        "/analyzers/%s: algorithm `%s' is invalid:\n%s"
+                        % (analyzername, algoname, "\n".join(thisalgo.errors))
+                    )
                     continue
 
             else:
                 thisalgo = self.algorithms[algoname]
-                if thisalgo.errors: continue  # already done
+                if thisalgo.errors:
+                    continue  # already done
 
             # checks all inputs correspond
-            for algoin, analyzerin in analyzer['inputs'].items():
+            for algoin, analyzerin in analyzer["inputs"].items():
                 if algoin not in thisalgo.input_map:
-                    self.errors.append("/analyzers/%s/inputs/%s: algorithm `%s' does " \
-                            "not have an input named `%s' - valid algorithm inputs " \
-                            "are %s" % (analyzername, analyzerin, algoname, algoin,
-                                ", ".join(thisalgo.input_map.keys())))
+                    self.errors.append(
+                        "/analyzers/%s/inputs/%s: algorithm `%s' does "
+                        "not have an input named `%s' - valid algorithm inputs "
+                        "are %s"
+                        % (
+                            analyzername,
+                            analyzerin,
+                            algoname,
+                            algoin,
+                            ", ".join(thisalgo.input_map.keys()),
+                        )
+                    )
 
             # checks if parallelization makes sense
-            if analyzer.get('nb_slots', 1) > 1 and not thisalgo.splittable:
-                self.errors.append("/analyzer/%s/nb_slots: you have set the number " \
-                        "of slots for algorithm `%s' to %d, but it is not " \
-                        "splittable" % (analyzername, thisalgo.name,
-                            analyzer['nb_slots']))
+            if analyzer.get("nb_slots", 1) > 1 and not thisalgo.splittable:
+                self.errors.append(
+                    "/analyzer/%s/nb_slots: you have set the number "
+                    "of slots for algorithm `%s' to %d, but it is not "
+                    "splittable" % (analyzername, thisalgo.name, analyzer["nb_slots"])
+                )
 
             # check parameter consistence
-            for parameter, value in analyzer.get('parameters', {}).items():
+            for parameter, value in analyzer.get("parameters", {}).items():
                 try:
                     thisalgo.clean_parameter(parameter, value)
                 except Exception as e:
-                    self.errors.append("/analyzer/%s/parameters/%s: cannot convert " \
-                            "value `%s' to required type: %s" % \
-                            (analyzername, parameter, value, e))
+                    self.errors.append(
+                        "/analyzer/%s/parameters/%s: cannot convert "
+                        "value `%s' to required type: %s"
+                        % (analyzername, parameter, value, e)
+                    )
 
             self.analyzers[analyzername] = analyzer
 
     def _check_global_parameters(self):
         """checks global parameters"""
 
-        for algoname, parameters in self.data['globals'].items():
-            if algoname in ['queue', 'environment']: continue #skip that
+        for algoname, parameters in self.data["globals"].items():
+            if algoname in ["queue", "environment"]:
+                continue  # skip that
 
             # else, algorithms must be loaded in memory already
             if algoname not in self.algorithms:
-                self.errors.append("/globals/%s: found parameter section for " \
-                        "algorithm `%s' which is not used anywhere in the " \
-                        "experiment" % (algoname, algoname))
+                self.errors.append(
+                    "/globals/%s: found parameter section for "
+                    "algorithm `%s' which is not used anywhere in the "
+                    "experiment" % (algoname, algoname)
+                )
                 continue
 
             # ...and each parameter must validate
             thisalgo = self.algorithms[algoname]
-            if not thisalgo.valid: continue  # doesn't even check
+            if not thisalgo.valid:
+                continue  # doesn't even check
             for parameter, value in parameters.items():
                 try:
                     thisalgo.clean_parameter(parameter, value)
                 except Exception as e:
-                    self.errors.append("/globals/%s/%s: cannot convert " \
-                            "value `%s' to required type: %s" % \
-                            (algoname, parameter, value, e))
+                    self.errors.append(
+                        "/globals/%s/%s: cannot convert "
+                        "value `%s' to required type: %s"
+                        % (algoname, parameter, value, e)
+                    )
 
     def _load_toolchain(self, data):
         """Loads the related toolchain"""
@@ -505,11 +598,15 @@ class Experiment(object):
 
         if self.toolchain.errors:
             if self.storage is not None:
-                self.errors.append("toolchain `%s' is not valid, because:\n  * %s" % \
-                        (self.storage.toolchain, '\n  * '.join(self.toolchain.errors)))
+                self.errors.append(
+                    "toolchain `%s' is not valid, because:\n  * %s"
+                    % (self.storage.toolchain, "\n  * ".join(self.toolchain.errors))
+                )
             else:
-                self.errors.append("toolchain data is not valid, because:\n  * %s" \
-                        % '\n  * '.join(self.toolchain.errors))
+                self.errors.append(
+                    "toolchain data is not valid, because:\n  * %s"
+                    % "\n  * ".join(self.toolchain.errors)
+                )
             return
 
     def _crosscheck_toolchain_datasets(self):
@@ -519,32 +616,41 @@ class Experiment(object):
 
         if sorted(toolchain_datasets.keys()) != sorted(self.datasets.keys()):
 
-            self.errors.append("mismatch between the toolchain dataset names (%s)" \
-                      " and the experiment's (%s)" % (
-                          ', '.join(sorted(toolchain_datasets.keys())),
-                          ', '.join(sorted(self.datasets.keys())))
-                      )
+            self.errors.append(
+                "mismatch between the toolchain dataset names (%s)"
+                " and the experiment's (%s)"
+                % (
+                    ", ".join(sorted(toolchain_datasets.keys())),
+                    ", ".join(sorted(self.datasets.keys())),
+                )
+            )
 
         # toolchain must use a subset of the dataset endpoints
         for dataset_name, dataset in self.datasets.items():
 
-            db_endpts = set(dataset['database'].set(
-                dataset['protocol'], dataset['set'])['outputs'].keys())
-            tc_endpts = set(toolchain_datasets[dataset_name]['outputs'])
+            db_endpts = set(
+                dataset["database"]
+                .set(dataset["protocol"], dataset["set"])["outputs"]
+                .keys()
+            )
+            tc_endpts = set(toolchain_datasets[dataset_name]["outputs"])
 
             if not tc_endpts.issubset(db_endpts):
 
-                self.errors.append("/datasets/%s: toolchain endpoints (%s) must " \
-                        "be a subset of what is available on database `%s', " \
-                        "protocol `%s', " "set `%s' outputs (%s)" % (
-                            dataset_name,
-                            ', '.join(tc_endpts),
-                            dataset['database'].name,
-                            dataset['protocol'],
-                            dataset['set'],
-                            ', '.join(db_endpts)
-                            )
-                        )
+                self.errors.append(
+                    "/datasets/%s: toolchain endpoints (%s) must "
+                    "be a subset of what is available on database `%s', "
+                    "protocol `%s', "
+                    "set `%s' outputs (%s)"
+                    % (
+                        dataset_name,
+                        ", ".join(tc_endpts),
+                        dataset["database"].name,
+                        dataset["protocol"],
+                        dataset["set"],
+                        ", ".join(db_endpts),
+                    )
+                )
 
     def _crosscheck_toolchain_blocks(self):
         """There must exist a 1-to-1 relation to existing blocks"""
@@ -553,25 +659,29 @@ class Experiment(object):
 
         if sorted(toolchain_blocks.keys()) != sorted(self.blocks.keys()):
 
-            self.errors.append("mismatch between the toolchain block names (%s)" \
-                      " and the experiment's (%s)" % (
-                          ', '.join(sorted(toolchain_blocks.keys())),
-                          ', '.join(sorted(self.blocks.keys())))
-                      )
+            self.errors.append(
+                "mismatch between the toolchain block names (%s)"
+                " and the experiment's (%s)"
+                % (
+                    ", ".join(sorted(toolchain_blocks.keys())),
+                    ", ".join(sorted(self.blocks.keys())),
+                )
+            )
 
         # the number of block endpoints and the toolchain's must match
         for block_name, block in self.blocks.items():
 
-            if len(block['inputs']) != len(toolchain_blocks[block_name]['inputs']):
-
-                self.errors.append("/blocks/%s: toolchain blocks has %d inputs " \
-                        "while the experiment has %d inputs" % (
-                            block_name,
-                            len(toolchain_blocks[block_name]['inputs']),
-                            len(block['inputs']),
-                            )
-                        )
+            if len(block["inputs"]) != len(toolchain_blocks[block_name]["inputs"]):
 
+                self.errors.append(
+                    "/blocks/%s: toolchain blocks has %d inputs "
+                    "while the experiment has %d inputs"
+                    % (
+                        block_name,
+                        len(toolchain_blocks[block_name]["inputs"]),
+                        len(block["inputs"]),
+                    )
+                )
 
     def _crosscheck_toolchain_analyzers(self):
         """There must exist a 1-to-1 relation to existing analyzers"""
@@ -580,25 +690,31 @@ class Experiment(object):
 
         if sorted(toolchain_analyzers.keys()) != sorted(self.analyzers.keys()):
 
-            self.errors.append("mismatch between the toolchain analyzer names " \
-                    "(%s) and the experiment's (%s)" % (
-                          ', '.join(sorted(toolchain_analyzers.keys())),
-                          ', '.join(sorted(self.analyzers.keys())))
-                      )
+            self.errors.append(
+                "mismatch between the toolchain analyzer names "
+                "(%s) and the experiment's (%s)"
+                % (
+                    ", ".join(sorted(toolchain_analyzers.keys())),
+                    ", ".join(sorted(self.analyzers.keys())),
+                )
+            )
 
         # the number of analyzer endpoints and the toolchain's must match
         for analyzer_name, analyzer in self.analyzers.items():
 
-            if len(analyzer['inputs']) != \
-                    len(toolchain_analyzers[analyzer_name]['inputs']):
-
-                self.errors.append("/analyzers/%s: toolchain analyzers has %d " \
-                        "inputs while the experiment has %d inputs" % (
-                            analyzer_name,
-                            len(toolchain_analyzers[analyzer_name]['inputs']),
-                            len(analyzer['inputs']),
-                            )
-                        )
+            if len(analyzer["inputs"]) != len(
+                toolchain_analyzers[analyzer_name]["inputs"]
+            ):
+
+                self.errors.append(
+                    "/analyzers/%s: toolchain analyzers has %d "
+                    "inputs while the experiment has %d inputs"
+                    % (
+                        analyzer_name,
+                        len(toolchain_analyzers[analyzer_name]["inputs"]),
+                        len(analyzer["inputs"]),
+                    )
+                )
 
     def _crosscheck_connection_dataformats(self, dataformat_cache):
         """Connected endpoints must use the same dataformat as defined by the
@@ -607,92 +723,110 @@ class Experiment(object):
 
         for connection in self.toolchain.connections:
 
-            from_endpt = connection['from'].split('.', 1)
+            from_endpt = connection["from"].split(".", 1)
 
             if from_endpt[0] in self.datasets:
                 dataset = self.datasets[from_endpt[0]]
-                from_dtype = dataset['database'].set(
-                        dataset['protocol'], dataset['set']
-                        )['outputs'][from_endpt[1]]
+                from_dtype = dataset["database"].set(
+                    dataset["protocol"], dataset["set"]
+                )["outputs"][from_endpt[1]]
                 from_name = "dataset"
 
-            elif from_endpt[0] in self.blocks: # it is a block
+            elif from_endpt[0] in self.blocks:  # it is a block
                 block = self.blocks[from_endpt[0]]
-                mapping = block['outputs']
+                mapping = block["outputs"]
                 imapping = dict(zip(mapping.values(), mapping.keys()))
-                algout = imapping[from_endpt[1]] #name of output on algorithm
-                from_dtype = self.algorithms[block['algorithm']].output_map[algout]
+                algout = imapping[from_endpt[1]]  # name of output on algorithm
+                from_dtype = self.algorithms[block["algorithm"]].output_map[algout]
                 from_name = "block"
             else:
                 self.errors.append("Unknown endpoint %s" % to_endpt[0])
                 continue
 
-            to_endpt = connection['to'].split('.', 1)
+            to_endpt = connection["to"].split(".", 1)
 
             if to_endpt[0] in self.blocks:
                 block = self.blocks[to_endpt[0]]
-                mapping = block['inputs']
+                mapping = block["inputs"]
                 imapping = dict(zip(mapping.values(), mapping.keys()))
-                algoin = imapping[to_endpt[1]] #name of input on algorithm
-                to_dtype = self.algorithms[block['algorithm']].input_map[algoin]
+                algoin = imapping[to_endpt[1]]  # name of input on algorithm
+                to_dtype = self.algorithms[block["algorithm"]].input_map[algoin]
                 to_name = "block"
 
             elif to_endpt[0] in self.loops:
                 loop = self.loops[to_endpt[0]]
-                mapping = loop['inputs']
+                mapping = loop["inputs"]
                 imapping = dict(zip(mapping.values(), mapping.keys()))
-                algoin = imapping[to_endpt[1]] #name of input on algorithm
-                to_dtype = self.algorithms[loop['algorithm']].input_map[algoin]
+                algoin = imapping[to_endpt[1]]  # name of input on algorithm
+                to_dtype = self.algorithms[loop["algorithm"]].input_map[algoin]
                 to_name = "loop"
 
             elif to_endpt[0] in self.analyzers:  # it is an analyzer
                 analyzer = self.analyzers[to_endpt[0]]
-                mapping = analyzer['inputs']
+                mapping = analyzer["inputs"]
                 imapping = dict(zip(mapping.values(), mapping.keys()))
-                algoin = imapping[to_endpt[1]] #name of input on algorithm
-                to_dtype = self.algorithms[analyzer['algorithm']].input_map[algoin]
+                algoin = imapping[to_endpt[1]]  # name of input on algorithm
+                to_dtype = self.algorithms[analyzer["algorithm"]].input_map[algoin]
                 to_name = "analyzer"
             else:
                 self.errors.append("Unknown endpoint %s" % to_endpt[0])
                 continue
 
-            if from_dtype == to_dtype: continue #OK
+            if from_dtype == to_dtype:
+                continue  # OK
 
             # The other acceptable condition is that the receiving end is a
-            # subset of the producing end. This can happen if the producing end
+            #  subset of the producing end. This can happen if the producing end
             # is a subclass of the receiving end - that is, the receiving end
             # uses a data format that is a parent of the producing end.
 
             from_format = dataformat_cache[from_dtype]
             to_format = dataformat_cache[to_dtype]
 
-            if to_format.isparent(from_format): continue #OK
+            if to_format.isparent(from_format):
+                continue  # OK
 
             # If you get to this point, then an error must be issued
-            self.errors.append("mismatch in data type at connection (%s) %s " \
-                    "-> (%s) %s - start point uses `%s' while end point " \
-                    "uses `%s' (must be equal or a parent format)" % (from_name,
-                        '.'.join(from_endpt), to_name, '.'.join(to_endpt),
-                        from_dtype, to_dtype))
-
+            self.errors.append(
+                "mismatch in data type at connection (%s) %s "
+                "-> (%s) %s - start point uses `%s' while end point "
+                "uses `%s' (must be equal or a parent format)"
+                % (
+                    from_name,
+                    ".".join(from_endpt),
+                    to_name,
+                    ".".join(to_endpt),
+                    from_dtype,
+                    to_dtype,
+                )
+            )
 
     def _crosscheck_block_algorithm_pertinence(self):
         """The number of groups and the input-output connectivity must respect
         the individual synchronization channels and the block's.
         """
 
-        for name, block in self.data['blocks'].items():
+        for name, block in self.data["blocks"].items():
 
             # filter connections that end on the visited block - remember, each
             # input is checked for receiving a single input connection. It is
             # illegal to connect an input multiple times. At this point, you
             # already know that is not the case.
-            input_connections = [k['channel'] for k in self.toolchain.connections \
-                    if k['to'].startswith(name + '.')]
+            input_connections = [
+                k["channel"]
+                for k in self.toolchain.connections
+                if k["to"].startswith(name + ".")
+            ]
 
             # filter connections that start on the visited block, retain output
             # name so we can check synchronization and then group
-            output_connections = set([(k['from'].replace(name + '.', ''), k['channel']) for k in self.toolchain.connections if k['from'].startswith(name + '.')])
+            output_connections = set(
+                [
+                    (k["from"].replace(name + ".", ""), k["channel"])
+                    for k in self.toolchain.connections
+                    if k["from"].startswith(name + ".")
+                ]
+            )
 
             output_connections = [k[1] for k in output_connections]
 
@@ -700,18 +834,21 @@ class Experiment(object):
             # for the grouping properties between inputs and outputs
 
             # create channel groups
-            chain_in  = collections.Counter(input_connections)
+            chain_in = collections.Counter(input_connections)
             chain_out = collections.Counter(output_connections)
-            chain_groups = [(v, chain_out.get(k,0)) for k,v in chain_in.items()]
+            chain_groups = [(v, chain_out.get(k, 0)) for k, v in chain_in.items()]
 
             # now check the algorithm for conformance
-            algo_groups = self.algorithms[self.blocks[name]['algorithm']].groups
-            algo_groups = [(len(k['inputs']), len(k.get('outputs',[]))) for k in \
-                    algo_groups]
+            algo_groups = self.algorithms[self.blocks[name]["algorithm"]].groups
+            algo_groups = [
+                (len(k["inputs"]), len(k.get("outputs", []))) for k in algo_groups
+            ]
             if collections.Counter(chain_groups) != collections.Counter(algo_groups):
-                self.errors.append("synchronization mismatch in input/output " \
-                        "grouping between block `%s' and algorithm `%s'" % \
-                        (name, self.blocks[name]['algorithm']))
+                self.errors.append(
+                    "synchronization mismatch in input/output "
+                    "grouping between block `%s' and algorithm `%s'"
+                    % (name, self.blocks[name]["algorithm"])
+                )
 
     def _crosscheck_analyzer_algorithm_pertinence(self):
         """
@@ -719,32 +856,36 @@ class Experiment(object):
         individual synchronization channels and the analyzer.
         """
 
-        for name, analyzer in self.data['analyzers'].items():
+        for name, analyzer in self.data["analyzers"].items():
 
             # filter connections that end on the visited block
-            input_connections = [k['channel'] for k in self.toolchain.connections \
-                    if k['to'].startswith(name + '.')]
+            input_connections = [
+                k["channel"]
+                for k in self.toolchain.connections
+                if k["to"].startswith(name + ".")
+            ]
 
             # note: dataformats have already been checked - only need to check
             # for the grouping properties for the inputs
 
             # create channel groups
-            chain_in  = collections.Counter(input_connections)
+            chain_in = collections.Counter(input_connections)
 
             # now check the algorithm for conformance
-            algo_groups = self.algorithms[self.analyzers[name]['algorithm']].groups
-            algo_groups = [len(k['inputs']) for k in algo_groups]
+            algo_groups = self.algorithms[self.analyzers[name]["algorithm"]].groups
+            algo_groups = [len(k["inputs"]) for k in algo_groups]
             if collections.Counter(chain_groups) != collections.Counter(algo_groups):
-                self.errors.append("synchronization mismatch in input " \
-                        "grouping between analyzer `%s' and algorithm `%s'" % \
-                        (name, self.analyzers[name]['algorithm']))
-
+                self.errors.append(
+                    "synchronization mismatch in input "
+                    "grouping between analyzer `%s' and algorithm `%s'"
+                    % (name, self.analyzers[name]["algorithm"])
+                )
 
     @property
     def label(self):
         """Returns the label of this experiment"""
 
-        return self._label or '__unlabelled_experiment__'
+        return self._label or "__unlabelled_experiment__"
 
     name = label  # compatiblity
 
@@ -753,13 +894,11 @@ class Experiment(object):
         self._label = value
         self.storage = Storage(self.prefix, value)
 
-
     @property
     def schema_version(self):
         """Returns the schema version"""
 
-        return self.data.get('schema_version', 1)
-
+        return self.data.get("schema_version", 1)
 
     @property
     def valid(self):
@@ -767,23 +906,30 @@ class Experiment(object):
 
         return not bool(self.errors)
 
-
     def _inputs(self, name):
         """Calculates and returns the inputs for a given block"""
 
         # filter connections that end on the visited block
-        _connections = [k for k in self.toolchain.connections \
-                if k['to'].startswith(name + '.')]
+        _connections = [
+            k for k in self.toolchain.connections if k["to"].startswith(name + ".")
+        ]
 
         # organize the connections into a map: block input name -> from key
-        connections = dict([(
-            k['to'].replace(name + '.', ''),
-            tuple(k['from'].split('.', 1) + [k['channel']]),
-            ) for k in _connections])
+        connections = dict(
+            [
+                (
+                    k["to"].replace(name + ".", ""),
+                    tuple(k["from"].split(".", 1) + [k["channel"]]),
+                )
+                for k in _connections
+            ]
+        )
 
         # makes sure we don't have multiple incomming connections
-        assert len(_connections) == len(connections), "detected multiple input " \
-          "connections for block `%s' on experiment `%s'" % (name, self.label)
+        assert len(_connections) == len(connections), (
+            "detected multiple input "
+            "connections for block `%s' on experiment `%s'" % (name, self.label)
+        )
 
         retval = dict()
 
@@ -796,30 +942,32 @@ class Experiment(object):
         if config_data is None:
             raise KeyError("did not find `%s' among blocks or analyzers" % name)
 
-        for algo_endpt, block_endpt in config_data['inputs'].items():
+        for algo_endpt, block_endpt in config_data["inputs"].items():
             block, output, channel = connections[block_endpt]
 
             if block in self.toolchain.datasets:
 
                 dataset_config = self.datasets[block]
                 retval[algo_endpt] = dict(
-                    database=dataset_config['database'].name,
-                    protocol=dataset_config['protocol'],
-                    set=dataset_config['set'],
+                    database=dataset_config["database"].name,
+                    protocol=dataset_config["protocol"],
+                    set=dataset_config["set"],
                     output=output,  # dataset output name always matches block's!
                     endpoint=block_endpt,  # the block intake name
                     channel=channel,
                     hash=hash.hashDataset(
-                        dataset_config['database'].name,
-                        dataset_config['protocol'],
-                        dataset_config['set']
+                        dataset_config["database"].name,
+                        dataset_config["protocol"],
+                        dataset_config["set"],
                     ),
                 )
 
                 # the path in the cache is calculated from the hash
-                retval[algo_endpt]['path'] = hash.toPath(retval[algo_endpt]['hash'], suffix='.db')
+                retval[algo_endpt]["path"] = hash.toPath(
+                    retval[algo_endpt]["hash"], suffix=".db"
+                )
 
-            else: #a normal block
+            else:  # a normal block
 
                 # Here comes the trick: block hashes cannot be easily generated
                 # - they require the input hashes to be adequately generated.
@@ -829,40 +977,43 @@ class Experiment(object):
 
                 block_config = self.blocks[block]
                 retval[algo_endpt] = {
-                        'from': '%s.%s' % (block, output),
-                        'channel': channel,
-                        'endpoint': block_endpt,  # the block intake name
-                        }
+                    "from": "%s.%s" % (block, output),
+                    "channel": channel,
+                    "endpoint": block_endpt,  # the block intake name
+                }
 
         return retval
 
-
     def _block_outputs(self, name):
         """Calculates and returns the outputs for a given block"""
 
         # filter connections that end on the visited block
-        connections = [k for k in self.toolchain.connections \
-                if k['from'].startswith(name + '.')]
+        connections = [
+            k for k in self.toolchain.connections if k["from"].startswith(name + ".")
+        ]
 
         # organize the connections into a map: block input name -> from key
-        connections = dict([(
-            k['from'].replace(name + '.', ''),
-            tuple(k['to'].split('.', 1) + [k['channel']]),
-        ) for k in connections])
+        connections = dict(
+            [
+                (
+                    k["from"].replace(name + ".", ""),
+                    tuple(k["to"].split(".", 1) + [k["channel"]]),
+                )
+                for k in connections
+            ]
+        )
 
         retval = dict()
 
         # notice: there can be multiply connected outputs
-        for algo_endpt, block_endpt in self.blocks[name]['outputs'].items():
+        for algo_endpt, block_endpt in self.blocks[name]["outputs"].items():
             block, input, channel = connections[block_endpt]
             retval[algo_endpt] = dict(
-                channel=channel,
-                endpoint=block_endpt,  # the block outtake name
+                channel=channel, endpoint=block_endpt  # the block outtake name
             )
 
         return retval
 
-
     def _configuration(self, name):
         """Returns the execution configuration for a particular block
 
@@ -890,19 +1041,18 @@ class Experiment(object):
                 break
 
         # resolve parameters taking globals in consideration
-        parameters = self.data['globals'].get(config_data['algorithm'])
+        parameters = self.data["globals"].get(config_data["algorithm"])
         if parameters is None:
             parameters = dict()
         else:
             parameters = dict(parameters)  # copy
 
-        parameters.update(config_data.get('parameters', {}))
+        parameters.update(config_data.get("parameters", {}))
 
         # resolve the execution information
-        queue = config_data.get('queue', self.data['globals']['queue'])
-        env = config_data.get('environment',
-                self.data['globals']['environment'])
-        nb_slots = config_data.get('nb_slots', 1)
+        queue = config_data.get("queue", self.data["globals"]["queue"])
+        env = config_data.get("environment", self.data["globals"]["environment"])
+        nb_slots = config_data.get("nb_slots", 1)
 
         toolchain_data = self.toolchain.algorithm_item(name)
 
@@ -910,47 +1060,46 @@ class Experiment(object):
             raise KeyError("did not find `%s' among blocks, loops or analyzers" % name)
 
         retval = dict(
-                inputs=self._inputs(name),
-                channel=toolchain_data['synchronized_channel'],
-                algorithm=config_data['algorithm'],
-                parameters=parameters,
-                queue=queue,
-                environment=env,
-                nb_slots=nb_slots,
-                )
+            inputs=self._inputs(name),
+            channel=toolchain_data["synchronized_channel"],
+            algorithm=config_data["algorithm"],
+            parameters=parameters,
+            queue=queue,
+            environment=env,
+            nb_slots=nb_slots,
+        )
 
         loop = self.toolchain.get_loop_for_block(name)
 
         if loop is not None:
-            loop_name = loop['name']
+            loop_name = loop["name"]
             loop_toolchain_data = self.toolchain.algorithm_item(loop_name)
-            loop_config_data = self.data['loops'][loop_name]
-            loop_algorithm = loop_config_data['algorithm']
+            loop_config_data = self.data["loops"][loop_name]
+            loop_algorithm = loop_config_data["algorithm"]
 
-            parameters = self.data['globals'].get(loop_algorithm, dict())
-            parameters.update(loop_config_data.get('parameters', dict()))
+            parameters = self.data["globals"].get(loop_algorithm, dict())
+            parameters.update(loop_config_data.get("parameters", dict()))
 
             loop_data = dict(
                 inputs=self._inputs(loop_name),
-                channel=loop_toolchain_data['synchronized_channel'],
+                channel=loop_toolchain_data["synchronized_channel"],
                 algorithm=loop_algorithm,
-                parameters=parameters
+                parameters=parameters,
             )
-            retval['loop'] = loop_data
+            retval["loop"] = loop_data
 
         if name in self.blocks:
-            retval['outputs'] = self._block_outputs(name)
+            retval["outputs"] = self._block_outputs(name)
         else:
             # Analyzers have only 1 output file/cache. This is the result of an
             # optimization as most of the outputs are single numbers.
             # Furthermore, given we need to read it out on beat.web, having a
             # single file optimizes resource usage. The synchronization channel
             # for the analyzer itself is respected.
-            retval['result'] = dict()  # missing the hash/path
+            retval["result"] = dict()  # missing the hash/path
 
         return retval
 
-
     def setup(self):
         """Prepares the experiment so it can be executed by a scheduling
         service.
@@ -973,51 +1122,59 @@ class Experiment(object):
 
         for key in exec_order:
             exec_order[key] = dict(
-                    dependencies = exec_order[key],
-                    configuration = self._configuration(key),
-                    )
+                dependencies=exec_order[key], configuration=self._configuration(key)
+            )
         for key, value in exec_order.items():
             # now compute missing hashes - because we're in execution order,
             # there should be no missing input hashes in any of the blocks.
-            config = value['configuration']
-            if 'outputs' in config:  # it is a block
+            config = value["configuration"]
+            if "outputs" in config:  # it is a block
                 block_outputs = {}
-                for output, output_value in config['outputs'].items():
-                    output_value['hash'] = hash.hashBlockOutput(
-                            key,
-                            config['algorithm'],
-                            self.algorithms[config['algorithm']].hash(),
-                            config['parameters'],
-                            config['environment'],
-                            dict([(k, v['hash']) for k, v in config['inputs'].items()]),
-                            output,
-                            )
-                    output_value['path'] = hash.toPath(output_value['hash'], '')
+                for output, output_value in config["outputs"].items():
+                    output_value["hash"] = hash.hashBlockOutput(
+                        key,
+                        config["algorithm"],
+                        self.algorithms[config["algorithm"]].hash(),
+                        config["parameters"],
+                        config["environment"],
+                        dict([(k, v["hash"]) for k, v in config["inputs"].items()]),
+                        output,
+                    )
+                    output_value["path"] = hash.toPath(output_value["hash"], "")
 
                     # set the inputs for the following blocks
-                    block_outputs['%s.%s' % (key, output_value['endpoint'])] = output_value
+                    block_outputs[
+                        "%s.%s" % (key, output_value["endpoint"])
+                    ] = output_value
 
-                dependents = [exec_order[k]['configuration'] for k in exec_order \
-                        if key in exec_order[k]['dependencies']]
+                dependents = [
+                    exec_order[k]["configuration"]
+                    for k in exec_order
+                    if key in exec_order[k]["dependencies"]
+                ]
 
                 # updates inputs which have not yet been updated
                 for dependent in dependents:
-                    for input_name, input_value in dependent['inputs'].items():
-                        if input_value.get('from') in block_outputs.keys():
-                            input_value['hash'] = block_outputs[input_value.get('from')]['hash']
-                            input_value['path'] = block_outputs[input_value.get('from')]['path']
-                            del input_value['from']  # no need for further update
+                    for input_name, input_value in dependent["inputs"].items():
+                        if input_value.get("from") in block_outputs.keys():
+                            input_value["hash"] = block_outputs[
+                                input_value.get("from")
+                            ]["hash"]
+                            input_value["path"] = block_outputs[
+                                input_value.get("from")
+                            ]["path"]
+                            del input_value["from"]  # no need for further update
 
             else:  # it is an analyzer: 1 single output
-                config['result']['hash'] = hash.hashAnalyzer(
-                        key,
-                        config['algorithm'],
-                        self.algorithms[config['algorithm']].hash(),
-                        config['parameters'],
-                        config['environment'],
-                        dict([(k, v['hash']) for k, v in config['inputs'].items()]),
-                        )
-                config['result']['path'] = hash.toPath(config['result']['hash'], '')
+                config["result"]["hash"] = hash.hashAnalyzer(
+                    key,
+                    config["algorithm"],
+                    self.algorithms[config["algorithm"]].hash(),
+                    config["parameters"],
+                    config["environment"],
+                    dict([(k, v["hash"]) for k, v in config["inputs"].items()]),
+                )
+                config["result"]["path"] = hash.toPath(config["result"]["hash"], "")
 
         return exec_order
 
@@ -1026,70 +1183,85 @@ class Experiment(object):
 
         from .drawing import create_port_table
 
-        title = 'Experiment: %s' % self.label
+        title = "Experiment: %s" % self.label
 
         def __label_callback(type, name):
             """Adds experiment information to the given block"""
 
-            if type == 'dataset':
+            if type == "dataset":
                 info = self.datasets[name]
-                return '<b><u>%s</u></b><br/>%s<br/><i>%s:%s</i>' % (name,
-                        info['database'].name, info['protocol'], info['set'])
-            elif type == 'block':
+                return "<b><u>%s</u></b><br/>%s<br/><i>%s:%s</i>" % (
+                    name,
+                    info["database"].name,
+                    info["protocol"],
+                    info["set"],
+                )
+            elif type == "block":
                 info = self.blocks[name]
-                env = info.get('environment', self.data['globals']['environment'])
-                nb_slots = info.get('nb_slots', 1)
-                return '<b><u>%s</u></b><br/>%s<br/><i>@%s(%s) x %d</i>' % (name,
-                        info['algorithm'], env['name'], env['version'], nb_slots)
-            elif type == 'analyzer':
+                env = info.get("environment", self.data["globals"]["environment"])
+                nb_slots = info.get("nb_slots", 1)
+                return "<b><u>%s</u></b><br/>%s<br/><i>@%s(%s) x %d</i>" % (
+                    name,
+                    info["algorithm"],
+                    env["name"],
+                    env["version"],
+                    nb_slots,
+                )
+            elif type == "analyzer":
                 info = self.analyzers[name]
-                env = info.get('environment', self.data['globals']['environment'])
-                nb_slots = info.get('nb_slots', 1)
-                return '<b><u>%s</u></b><br/>%s<br/><i>@%s(%s) x %d</i>' % (name,
-                        info['algorithm'], env['name'], env['version'], nb_slots)#, ports)
+                env = info.get("environment", self.data["globals"]["environment"])
+                nb_slots = info.get("nb_slots", 1)
+                return "<b><u>%s</u></b><br/>%s<br/><i>@%s(%s) x %d</i>" % (
+                    name,
+                    info["algorithm"],
+                    env["name"],
+                    env["version"],
+                    nb_slots,
+                )  # , ports)
             else:
                 return name
 
         def __result_callback(name):
             """Adds result information to analyzers"""
 
-            def __mkport(k,v):
-                name = k if not v['display'] else '+' + k
-                return '%s<br/>(%s)' % (name, v['type'])
+            def __mkport(k, v):
+                name = k if not v["display"] else "+" + k
+                return "%s<br/>(%s)" % (name, v["type"])
 
             info = self.analyzers[name]
-            results = self.algorithms[info['algorithm']].results
-            return [__mkport(k,v) for k,v in results.items()]
+            results = self.algorithms[info["algorithm"]].results
+            return [__mkport(k, v) for k, v in results.items()]
 
         def __edge_callback(start):
             """Adds the datatype to the given block"""
 
-            block, endpoint = start.split('.', 1)
+            block, endpoint = start.split(".", 1)
             if block in self.datasets:
                 db = self.datasets[block]
-                dbset = db['database'].set(db['protocol'], db['set'])
-                return dbset['outputs'][endpoint]
+                dbset = db["database"].set(db["protocol"], db["set"])
+                return dbset["outputs"][endpoint]
             else:
-                forward_mapping = self.blocks[block]['outputs']
-                reverse_mapping = dict((v,k) for k,v in forward_mapping.items())
+                forward_mapping = self.blocks[block]["outputs"]
+                reverse_mapping = dict((v, k) for k, v in forward_mapping.items())
                 algo_output = reverse_mapping[endpoint]
-                algo = self.algorithms[self.blocks[block]['algorithm']]
+                algo = self.algorithms[self.blocks[block]["algorithm"]]
                 return algo.output_map[algo_output]
 
-        return self.toolchain.dot_diagram(title, __label_callback, __edge_callback, __result_callback)
+        return self.toolchain.dot_diagram(
+            title, __label_callback, __edge_callback, __result_callback
+        )
 
     @property
     def description(self):
         """The short description for this object"""
 
-        return self.data.get('description', None)
+        return self.data.get("description", None)
 
     @description.setter
     def description(self, value):
         """Sets the short description for this object"""
 
-        self.data['description'] = value
-
+        self.data["description"] = value
 
     @property
     def documentation(self):
@@ -1109,12 +1281,11 @@ class Experiment(object):
         if not self._label:
             raise RuntimeError("experiment has no label")
 
-        if hasattr(value, 'read'):
+        if hasattr(value, "read"):
             self.storage.doc.save(value.read())
         else:
             self.storage.doc.save(value)
 
-
     def hash(self):
         """Returns the hexadecimal hash for its declaration"""
 
@@ -1123,7 +1294,6 @@ class Experiment(object):
 
         return self.storage.hash()
 
-
     def json_dumps(self, indent=4):
         """Dumps the JSON declaration of this object in a string
 
@@ -1139,15 +1309,12 @@ class Experiment(object):
           str: The JSON representation for this object
         """
 
-        return simplejson.dumps(self.data, indent=indent,
-            cls=utils.NumpyJSONEncoder)
-
+        return simplejson.dumps(self.data, indent=indent, cls=utils.NumpyJSONEncoder)
 
     def __str__(self):
 
         return self.json_dumps()
 
-
     def write(self, storage=None):
         """Writes contents to prefix location
 
@@ -1161,11 +1328,10 @@ class Experiment(object):
         if storage is None:
             if not self._label:
                 raise RuntimeError("experiment has no label")
-            storage = self.storage #overwrite
+            storage = self.storage  # overwrite
 
         storage.save(str(self), self.description)
 
-
     def export(self, prefix):
         """Recursively exports itself into another prefix
 
@@ -1194,8 +1360,9 @@ class Experiment(object):
             raise RuntimeError("experiment is not valid")
 
         if prefix == self.prefix:
-            raise RuntimeError("Cannot export experiment to the same prefix ("
-                               "%s)" % (prefix))
+            raise RuntimeError(
+                "Cannot export experiment to the same prefix (" "%s)" % (prefix)
+            )
 
         self.toolchain.write(toolchain.Storage(prefix, self.toolchain.name))
 
diff --git a/beat/core/hash.py b/beat/core/hash.py
index ce161764168a14f700f7bb609e7b71b5260baa56..84f40b6127cb92523a18d4a900acf86f293e9fc9 100644
--- a/beat/core/hash.py
+++ b/beat/core/hash.py
@@ -1,29 +1,37 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
 
 
 """
@@ -49,8 +57,15 @@ from beat.backend.python.hash import _compact
 # ----------------------------------------------------------
 
 
-def hashBlockOutput(block_name, algorithm_name, algorithm_hash,
-                    parameters, environment, input_hashes, output_name):
+def hashBlockOutput(
+    block_name,
+    algorithm_name,
+    algorithm_hash,
+    parameters,
+    environment,
+    input_hashes,
+    output_name,
+):
     """Generate a hash for a given block output
 
     Parameters:
@@ -73,22 +88,33 @@ def hashBlockOutput(block_name, algorithm_name, algorithm_hash,
     # Note: 'block_name' and 'algorithm_name' aren't used to compute the hash,
     # but are useful when an application wants to implement its own hash
     # function
-    s = _compact("""{
+    s = (
+        _compact(
+            """{
         "algorithm": "%s",
         "parameters": %s,
         "environment": %s,
         "inputs": %s,
         "output": "%s"
-}""") % (algorithm_hash, _stringify(parameters), _stringify(environment),
-           _stringify(input_hashes), output_name)
+}"""
+        )
+        % (
+            algorithm_hash,
+            _stringify(parameters),
+            _stringify(environment),
+            _stringify(input_hashes),
+            output_name,
+        )
+    )
     return hash(s)
 
 
 # ----------------------------------------------------------
 
 
-def hashAnalyzer(analyzer_name, algorithm_name, algorithm_hash,
-                 parameters, environment, input_hashes):
+def hashAnalyzer(
+    analyzer_name, algorithm_name, algorithm_hash, parameters, environment, input_hashes
+):
     """Generate a hash for a given analyzer
 
     Parameters:
@@ -107,14 +133,24 @@ def hashAnalyzer(analyzer_name, algorithm_name, algorithm_hash,
 
     # Note: 'analyzer_name' isn't used to compute the hash, but is useful when
     # an applications want to implement its own hash function
-    s = _compact("""{
+    s = (
+        _compact(
+            """{
         "algorithm_name": "%s",
         "algorithm": "%s",
         "parameters": %s,
         "environment": %s,
         "inputs": %s
-}""") % (algorithm_name, algorithm_hash, _stringify(parameters),
-          _stringify(environment), _stringify(input_hashes))
+}"""
+        )
+        % (
+            algorithm_name,
+            algorithm_hash,
+            _stringify(parameters),
+            _stringify(environment),
+            _stringify(input_hashes),
+        )
+    )
     return hash(s)
 
 
@@ -128,8 +164,10 @@ def hashJSONStr(contents, description):
     """
 
     try:
-        return hashJSON(simplejson.loads(contents,
-          object_pairs_hook=collections.OrderedDict), description)  # preserve order
+        return hashJSON(
+            simplejson.loads(contents, object_pairs_hook=collections.OrderedDict),
+            description,
+        )  # preserve order
     except simplejson.JSONDecodeError:
         # falls back to normal file content hashing
         return hash(contents)
diff --git a/beat/core/inputs.py b/beat/core/inputs.py
index 040f577a5c24500fb59814bf3d1bf359a00129a4..aa12de6098e2128b5aa19b20cb5df9cbe06dd40d 100644
--- a/beat/core/inputs.py
+++ b/beat/core/inputs.py
@@ -1,29 +1,38 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
+
 
 """
 ======
diff --git a/beat/core/library.py b/beat/core/library.py
index a2a1bee40f933533397a8277a1d7f2a968e8fcac..3a9b7cc7dbbc684d163c70d0644c0af6b4cf271e 100644
--- a/beat/core/library.py
+++ b/beat/core/library.py
@@ -1,29 +1,37 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
 
 
 """
@@ -105,7 +113,6 @@ class Library(BackendLibrary):
     def __init__(self, prefix, data, library_cache=None):
         super(Library, self).__init__(prefix, data, library_cache)
 
-
     def _load(self, data, library_cache):
         """Loads the library"""
 
@@ -125,7 +132,6 @@ class Library(BackendLibrary):
         elif isinstance(data, (tuple, list)):  # user has passed individual info
             data, code = data  # break down into two components
 
-
         if isinstance(data, six.string_types):  # user has passed a file pointer
             # make sure to log this into the cache (avoids recursion)
             library_cache[data] = None
@@ -133,54 +139,52 @@ class Library(BackendLibrary):
             self._name = data
             self.storage = Storage(self.prefix, self._name)
             if not self.storage.json.exists():
-                self.errors.append('Library declaration file not found: %s' % data)
+                self.errors.append("Library declaration file not found: %s" % data)
                 return
 
             data = self.storage.json.path  # loads data from JSON declaration
 
-
         # At this point, `data' can be a dictionary or ``None``
         if data is None:  # loads the default declaration for an library
-            self.data, self.errors = prototypes.load('library')
+            self.data, self.errors = prototypes.load("library")
             assert not self.errors, "\n  * %s" % "\n  *".join(self.errors)
         else:  # just assign it
             # this runs basic validation, including JSON loading if required
-            self.data, self.errors = schema.validate('library', data)
+            self.data, self.errors = schema.validate("library", data)
 
-
-        if self.errors: return  # don't proceed with the rest of validation
+        if self.errors:
+            return  # don't proceed with the rest of validation
 
         if self.storage is not None:  # loading from the disk, check code
             if not self.storage.code.exists():
-                self.errors.append('Library code not found: %s' % \
-                        self.storage.code.path)
+                self.errors.append(
+                    "Library code not found: %s" % self.storage.code.path
+                )
                 return
             else:
                 code = self.storage.code.load()
 
-
         # At this point, `code' can be a string (or a binary blob) or ``None``
         if code is None:  # loads the default code for an library
-            self.code = prototypes.binary_load('library.py')
-            self.data['language'] = 'python'
+            self.code = prototypes.binary_load("library.py")
+            self.data["language"] = "python"
 
         else:  # just assign it - notice that in this case, no language is set
             self.code = code
 
-
-        if self.errors: return  # don't proceed with the rest of validation
-
+        if self.errors:
+            return  # don't proceed with the rest of validation
 
         # if no errors so far, make sense out of the library data
-        self.data.setdefault('uses', {})
+        self.data.setdefault("uses", {})
 
         # now we check for consistence
         self._validate_required_libraries(library_cache)
-        if self.errors: return  # don't proceed with the rest of validation
+        if self.errors:
+            return  # don't proceed with the rest of validation
 
         self._check_language_consistence()
 
-
     def _validate_required_libraries(self, library_cache):
 
         # all used libraries must be loadable; cannot use self as a library
@@ -189,27 +193,34 @@ class Library(BackendLibrary):
             for name, value in self.uses.items():
                 if value in library_cache:
                     if library_cache[value] is None:
-                        self.errors.append("recursion for library `%s' detected" % value)
+                        self.errors.append(
+                            "recursion for library `%s' detected" % value
+                        )
                         continue
                     self.libraries[value] = library_cache[value]
                 else:
                     self.libraries[value] = Library(self.prefix, value, library_cache)
 
                 if not self.libraries[value].valid:
-                    self.errors.append("referred library `%s' (%s) is not valid" % \
-                            (self.libraries[value].name, name))
-
+                    self.errors.append(
+                        "referred library `%s' (%s) is not valid"
+                        % (self.libraries[value].name, name)
+                    )
 
     def _check_language_consistence(self):
 
         # all used libraries must be programmed with the same language
-        if self.language == 'unknown': return  # bail out on unknown language
+        if self.language == "unknown":
+            return  # bail out on unknown language
 
         if self.uses is not None:
             for name, library in self.uses.items():
-                if library not in self.libraries: continue  # invalid
+                if library not in self.libraries:
+                    continue  # invalid
 
                 if self.libraries[library].language != self.language:
-                    self.errors.append("language for used library `%s' (`%s') " \
-                            "differs from current language for this library (`%s')" % \
-                            (library, self.libraries[library].language, self.language))
+                    self.errors.append(
+                        "language for used library `%s' (`%s') "
+                        "differs from current language for this library (`%s')"
+                        % (library, self.libraries[library].language, self.language)
+                    )
diff --git a/beat/core/loader.py b/beat/core/loader.py
index c22240fc747787bc9ba3f7db0070cebfd24d38ca..3a1e98baae2bf3169688b87b87aa2446d9584ad4 100644
--- a/beat/core/loader.py
+++ b/beat/core/loader.py
@@ -1,29 +1,38 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
+
 
 """
 ======
diff --git a/beat/core/outputs.py b/beat/core/outputs.py
index 49884433feec59a6e71c5ef382c2b55b994742b4..e87a728a5e1d352e6cd7db285beaa4022033b262 100644
--- a/beat/core/outputs.py
+++ b/beat/core/outputs.py
@@ -1,29 +1,38 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
+
 
 """
 =======
diff --git a/beat/core/plotter.py b/beat/core/plotter.py
index e466d298f48c34efa282fa61f49a3e07c463e2b6..e7827e88d3449e33de895e7ef1d1cc62d739f83b 100644
--- a/beat/core/plotter.py
+++ b/beat/core/plotter.py
@@ -1,29 +1,37 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
 
 
 """
@@ -62,14 +70,14 @@ class Storage(utils.CodeStorage):
 
     def __init__(self, prefix, name, language=None):
 
-        if name.count('/') != 2:
+        if name.count("/") != 2:
             raise RuntimeError("invalid plotter name: `%s'" % name)
 
-        self.username, self.name, self.version = name.split('/')
+        self.username, self.name, self.version = name.split("/")
         self.fullname = name
         self.prefix = prefix
 
-        path = utils.hashed_or_simple(self.prefix, 'plotters', name, suffix='.json')
+        path = utils.hashed_or_simple(self.prefix, "plotters", name, suffix=".json")
         path = path[:-5]
 
         super(Storage, self).__init__(path, language)
@@ -79,24 +87,23 @@ class Storage(utils.CodeStorage):
 
 
 class Runner(algorithm.Runner):
-    '''A special loader class for plotters, with specialized methods'''
+    """A special loader class for plotters, with specialized methods"""
 
-
-    def process(self, inputs=None, ):
-        '''Runs through data'''
+    def process(self, inputs=None):
+        """Runs through data"""
 
         exc = self.exc or RuntimeError
 
         def _check_argument(argument, name):
             if argument is None:
-                raise exc('Missing argument: %s' % name)
+                raise exc("Missing argument: %s" % name)
 
         # setup() must have run
         if not self.ready:
             raise exc("Plottr '%s' is not yet setup" % self.name)
 
-        _check_argument(inputs, 'inputs')
-        return loader.run(self.obj, 'process', self.exc, inputs)
+        _check_argument(inputs, "inputs")
+        return loader.run(self.obj, "process", self.exc, inputs)
 
 
 # ----------------------------------------------------------
@@ -207,52 +214,49 @@ class Plotter(object):
 
             data, code = data  # break down into two components
 
-
         if isinstance(data, six.string_types):  # user has passed a file pointer
 
             self._name = data
             self.storage = Storage(self.prefix, self._name)
             if not self.storage.json.exists():
-                self.errors.append('Plotter declaration file not found: %s' % data)
+                self.errors.append("Plotter declaration file not found: %s" % data)
                 return
 
             data = self.storage.json.path  # loads data from JSON declaration
 
-
         # At this point, `data' can be a dictionary or ``None``
         if data is None:  # loads the default declaration for an algorithm
-            self.data, self.errors = prototypes.load('plotter')
+            self.data, self.errors = prototypes.load("plotter")
             assert not self.errors, "\n  * %s" % "\n  *".join(self.errors)
         else:  # just assign it
             # this runs basic validation, including JSON loading if required
-            self.data, self.errors = schema.validate('plotter', data)
+            self.data, self.errors = schema.validate("plotter", data)
 
+        if self.errors:
+            return  # don't proceed with the rest of validation
 
-        if self.errors: return  # don't proceed with the rest of validation
-
-        if self.storage is not None: #loading from the disk, check code
+        if self.storage is not None:  # loading from the disk, check code
             if not self.storage.code.exists():
-                self.errors.append('Plotter code not found: %s' % \
-                        self.storage.code.path)
+                self.errors.append(
+                    "Plotter code not found: %s" % self.storage.code.path
+                )
                 return
             else:
                 code = self.storage.code.load()
 
-
         # At this point, `code' can be a string (or a binary blob) or ``None``
         if code is None:  # loads the default code for an algorithm
-            self.code = prototypes.binary_load('plotter.py')
-            self.data['language'] = 'python'
+            self.code = prototypes.binary_load("plotter.py")
+            self.data["language"] = "python"
 
         else:  # just assign it - notice that in this case, no language is set
             self.code = code
 
-
-        if self.errors: return  # don't proceed with the rest of validation
-
+        if self.errors:
+            return  # don't proceed with the rest of validation
 
         # if no errors so far, make sense out of the declaration data
-        self.parameters = self.data.setdefault('parameters', {})
+        self.parameters = self.data.setdefault("parameters", {})
         self.dataformat = None
 
         self._validate_dataformat(dataformat_cache)
@@ -262,69 +266,63 @@ class Plotter(object):
         self._validate_required_libraries(library_cache)
         self._check_language_consistence()
 
-
     # Methods re-bound from the Algorithm class
     if six.PY2:
-        _convert_parameter_types = \
-                algorithm.Algorithm._convert_parameter_types.im_func
+        _convert_parameter_types = algorithm.Algorithm._convert_parameter_types.im_func
 
-        _validate_required_libraries = \
-                algorithm.Algorithm._validate_required_libraries.im_func
+        _validate_required_libraries = (
+            algorithm.Algorithm._validate_required_libraries.im_func
+        )
 
-        _check_language_consistence = \
-                algorithm.Algorithm._check_language_consistence.im_func
+        _check_language_consistence = (
+            algorithm.Algorithm._check_language_consistence.im_func
+        )
     else:
-        _convert_parameter_types = \
-                algorithm.Algorithm._convert_parameter_types
-
-        _validate_required_libraries = \
-                algorithm.Algorithm._validate_required_libraries
-
-        _check_language_consistence = \
-                algorithm.Algorithm._check_language_consistence
+        _convert_parameter_types = algorithm.Algorithm._convert_parameter_types
 
+        _validate_required_libraries = algorithm.Algorithm._validate_required_libraries
 
+        _check_language_consistence = algorithm.Algorithm._check_language_consistence
 
     def _validate_dataformat(self, dataformat_cache):
         """Makes sure we can load the requested format
         """
 
-        name = self.data['dataformat']
+        name = self.data["dataformat"]
 
         if dataformat_cache and name in dataformat_cache:  # reuse
             self.dataformat = dataformat_cache[name]
-        else: #load it
-            self.dataformat = dataformat.DataFormat(self.prefix, name,
-                    dataformat_cache=dataformat_cache)
+        else:  # load it
+            self.dataformat = dataformat.DataFormat(
+                self.prefix, name, dataformat_cache=dataformat_cache
+            )
             dataformat_cache[name] = self.dataformat
 
         if self.dataformat.errors:
-            self.errors.append("found error validating base data format `%s' " \
-                    "for plotter `%s': %s" % \
-                    (name, self.name, '\n'.join(self.dataformat.errors)))
-
+            self.errors.append(
+                "found error validating base data format `%s' "
+                "for plotter `%s': %s"
+                % (name, self.name, "\n".join(self.dataformat.errors))
+            )
 
     @property
     def schema_version(self):
         """Returns the schema version"""
-        return self.data.get('schema_version', 1)
-
+        return self.data.get("schema_version", 1)
 
     @property
     def name(self):
         """Returns the name of this object
         """
-        return self._name or '__unnamed_plotter__'
-
+        return self._name or "__unnamed_plotter__"
 
     @name.setter
     def name(self, value):
-        if self.data['language'] == 'unknown':
+        if self.data["language"] == "unknown":
             raise RuntimeError("plotter has no programming language set")
 
         self._name = value
-        self.storage = Storage(self.prefix, value, self.data['language'])
-
+        self.storage = Storage(self.prefix, value, self.data["language"])
 
     language = algorithm.Algorithm.language
     if six.PY2:
@@ -333,17 +331,15 @@ class Plotter(object):
         clean_parameter = algorithm.Algorithm.clean_parameter
     valid = algorithm.Algorithm.valid
 
-
     @property
     def api_version(self):
         """Returns the API version"""
-        return self.data.get('api_version', 1)
-
+        return self.data.get("api_version", 1)
 
     def uses_dict(self):
         """Returns the usage dictionary for all dependent modules"""
 
-        if self.data['language'] == 'unknown':
+        if self.data["language"] == "unknown":
             raise RuntimeError("plotter has no programming language set")
 
         if not self._name:
@@ -354,14 +350,13 @@ class Plotter(object):
         if self.uses is not None:
             for name, value in self.uses.items():
                 retval[name] = dict(
-                        path=self.libraries[value].storage.code.path,
-                        uses=self.libraries[value].uses_dict(),
-                        )
+                    path=self.libraries[value].storage.code.path,
+                    uses=self.libraries[value].uses_dict(),
+                )
 
         return retval
 
-
-    def runner(self, klass='Plotter', exc=None):
+    def runner(self, klass="Plotter", exc=None):
         """Returns a runnable plotter object.
 
         Parameters:
@@ -385,7 +380,7 @@ class Plotter(object):
             exc = exc or RuntimeError
             raise exc("plotter has no name")
 
-        if self.data['language'] == 'unknown':
+        if self.data["language"] == "unknown":
             exc = exc or RuntimeError
             raise exc("plotter has no programming language set")
 
@@ -396,9 +391,15 @@ class Plotter(object):
 
         # loads the module only once through the lifetime of the plotter object
         try:
-            self.__module = getattr(self, 'module',
-                    loader.load_module(self.name.replace(os.sep, '_'),
-                        self.storage.code.path, self.uses_dict()))
+            self.__module = getattr(
+                self,
+                "module",
+                loader.load_module(
+                    self.name.replace(os.sep, "_"),
+                    self.storage.code.path,
+                    self.uses_dict(),
+                ),
+            )
         except Exception as e:
             if exc is not None:
                 type, value, traceback = sys.exc_info()
@@ -408,10 +409,8 @@ class Plotter(object):
 
         return Runner(self.__module, klass, self, exc)
 
-
     description = algorithm.Algorithm.description
 
-
     @property
     def documentation(self):
         """The full-length description for this object"""
@@ -423,7 +422,6 @@ class Plotter(object):
             return self.storage.doc.load()
         return None
 
-
     @documentation.setter
     def documentation(self, value):
         """Sets the full-length description for this object"""
@@ -431,16 +429,14 @@ class Plotter(object):
         if not self._name:
             raise RuntimeError("plotter has no name")
 
-        if hasattr(value, 'read'):
+        if hasattr(value, "read"):
             self.storage.doc.save(value.read())
         else:
             self.storage.doc.save(value)
 
-
     uses = algorithm.Algorithm.uses
     parameters = algorithm.Algorithm.parameters
 
-
     def hash(self):
         """Returns the hexadecimal hash for the current plotter"""
 
@@ -449,7 +445,6 @@ class Plotter(object):
 
         return self.storage.hash()
 
-
     def write(self, storage=None):
         """Writes contents to prefix location
 
@@ -461,7 +456,7 @@ class Plotter(object):
 
         """
 
-        if self.data['language'] == 'unknown':
+        if self.data["language"] == "unknown":
             raise RuntimeError("plotter has no programming language set")
 
         if storage is None:
diff --git a/beat/core/prototypes/__init__.py b/beat/core/prototypes/__init__.py
index 3374ad297c79694014cd3dcffb41f73e04201ad2..57b111da5a5cf09faaf689fa46e8d2c8414a2581 100644
--- a/beat/core/prototypes/__init__.py
+++ b/beat/core/prototypes/__init__.py
@@ -1,32 +1,39 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
-
-
-'''This module contains prototypes and loading functions for our JSON schemas'''
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
+
+"""This module contains prototypes and loading functions for our JSON schemas"""
 
 import pkg_resources
 
@@ -34,14 +41,17 @@ import simplejson
 
 from .. import schema
 
+
 def load(name):
-  '''Loads a given prototype by name from this directory'''
+    """Loads a given prototype by name from this directory"""
+
+    fname = pkg_resources.resource_filename(__name__, name + ".json")
+    return schema.validate(name, fname)
 
-  fname = pkg_resources.resource_filename(__name__, name + '.json')
-  return schema.validate(name, fname)
 
 def binary_load(name):
-  '''Loads a given prototype by filename in binary mode - no checks'''
+    """Loads a given prototype by filename in binary mode - no checks"""
 
-  fname = pkg_resources.resource_filename(__name__, name)
-  with open(fname, 'rb') as f: return f.read()
+    fname = pkg_resources.resource_filename(__name__, name)
+    with open(fname, "rb") as f:
+        return f.read()
diff --git a/beat/core/schema/__init__.py b/beat/core/schema/__init__.py
index 513749cd32809bd23ca3017c03744d795a8d1654..0c79fe748aa1366f83491d136a5091faad4bfdcd 100644
--- a/beat/core/schema/__init__.py
+++ b/beat/core/schema/__init__.py
@@ -1,32 +1,39 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
-
-
-'''Schema validation for BEAT JSON I/O'''
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
+
+"""Schema validation for BEAT JSON I/O"""
 
 
 import os
@@ -39,26 +46,26 @@ import jsonschema
 
 
 def maybe_load_json(s):
-  """Maybe loads the JSON from a string or filename"""
-
-  # if it is a string
-  if isinstance(s, six.string_types):
-    # if it is a valid path
-    if os.path.exists(s):
-      with open(s, 'rt') as f:
-        return maybe_load_json(f)
-    else:
-      return simplejson.loads(s, object_pairs_hook=collections.OrderedDict)
+    """Maybe loads the JSON from a string or filename"""
+
+    # if it is a string
+    if isinstance(s, six.string_types):
+        # if it is a valid path
+        if os.path.exists(s):
+            with open(s, "rt") as f:
+                return maybe_load_json(f)
+        else:
+            return simplejson.loads(s, object_pairs_hook=collections.OrderedDict)
 
-  # if it is a 'file-like' object
-  if hasattr(s, 'read'):
-    return maybe_load_json(s.read())
+    # if it is a 'file-like' object
+    if hasattr(s, "read"):
+        return maybe_load_json(s.read())
 
-  return s
+    return s
 
 
 def load_schema(schema_name, version=1):
-  """Returns a JSON validator for the schema given the relative name
+    """Returns a JSON validator for the schema given the relative name
 
 
   Parameters:
@@ -81,22 +88,23 @@ def load_schema(schema_name, version=1):
 
   """
 
-  fname = pkg_resources.resource_filename(__name__,
-          os.path.join(schema_name, '%d.json' % version))
+    fname = pkg_resources.resource_filename(
+        __name__, os.path.join(schema_name, "%d.json" % version)
+    )
 
-  with open(fname, 'rb') as f:
-    data = f.read().decode()
-    schema = simplejson.loads(data)
+    with open(fname, "rb") as f:
+        data = f.read().decode()
+        schema = simplejson.loads(data)
 
-  basedir = os.path.realpath(os.path.dirname(fname))
-  resolver = jsonschema.RefResolver('file://' + basedir + '/', schema)
+    basedir = os.path.realpath(os.path.dirname(fname))
+    resolver = jsonschema.RefResolver("file://" + basedir + "/", schema)
 
-  # now we load it
-  return jsonschema.Draft4Validator(schema, resolver=resolver)
+    # now we load it
+    return jsonschema.Draft4Validator(schema, resolver=resolver)
 
 
 def validate(schema_name, data):
-  """Validates the input data using the schema
+    """Validates the input data using the schema
 
   This function handles schema versionning in the context of BEAT transparently
   by first peeking the schema version required by the JSON data and then
@@ -147,26 +155,30 @@ def validate(schema_name, data):
 
   """
 
-  try:
-    data = maybe_load_json(data)
-  except simplejson.JSONDecodeError as e:
-    return data, ["invalid JSON code: %s" % str(e)]
+    try:
+        data = maybe_load_json(data)
+    except simplejson.JSONDecodeError as e:
+        return data, ["invalid JSON code: %s" % str(e)]
 
-  # handles the schema version
-  if schema_name != 'dataformat': version = data.get('schema_version', 1)
-  else: version = data.get('#schema_version', 1)
+    # handles the schema version
+    if schema_name != "dataformat":
+        version = data.get("schema_version", 1)
+    else:
+        version = data.get("#schema_version", 1)
 
-  validator = load_schema(schema_name, version)
+    validator = load_schema(schema_name, version)
 
-  def encode_error(error, indent=''):
-    abspath = '/'.join([''] + ([str(k) for k in error.absolute_path] or ['']))
-    schpath = '/'.join([''] + ([str(k) for k in error.schema_path] or ['']))
-    retval = indent + '%s: %s (rule: %s)' % (abspath, error.message, schpath)
-    for another_error in error.context:
-      retval += '\n' + encode_error(another_error, indent + '  ')
-    return retval
+    def encode_error(error, indent=""):
+        abspath = "/".join([""] + ([str(k) for k in error.absolute_path] or [""]))
+        schpath = "/".join([""] + ([str(k) for k in error.schema_path] or [""]))
+        retval = indent + "%s: %s (rule: %s)" % (abspath, error.message, schpath)
+        for another_error in error.context:
+            retval += "\n" + encode_error(another_error, indent + "  ")
+        return retval
 
-  errorlist = [encode_error(k) for k in \
-          sorted(validator.iter_errors(data), key=lambda e: e.path)]
+    errorlist = [
+        encode_error(k)
+        for k in sorted(validator.iter_errors(data), key=lambda e: e.path)
+    ]
 
-  return data, errorlist
+    return data, errorlist
diff --git a/beat/core/scripts/worker.py b/beat/core/scripts/worker.py
index 1ba6ad88dff73a7c6e173d0e8ae5b0b6eea2ba31..c99e3b6018272cfd753053fd19edb611913dd25c 100755
--- a/beat/core/scripts/worker.py
+++ b/beat/core/scripts/worker.py
@@ -1,30 +1,37 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2017 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
-
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
 
 """Starts the worker process (%(version)s)
 
@@ -79,11 +86,10 @@ stop = False
 logger = None
 
 
-#----------------------------------------------------------
+# ----------------------------------------------------------
 
 
 class ExecutionProcess(multiprocessing.Process):
-
     def __init__(self, queue, job_id, prefix, data, cache, docker, images_cache=None):
         super(ExecutionProcess, self).__init__()
 
@@ -95,41 +101,41 @@ class ExecutionProcess(multiprocessing.Process):
         self.docker = docker
         self.images_cache = images_cache
 
-
     def run(self):
         signal.signal(signal.SIGTERM, signal.SIG_DFL)
         signal.signal(signal.SIGINT, signal.SIG_DFL)
 
         logger.debug("Process (pid=%d) started for job #%s", self.pid, self.job_id)
-        self.queue.put('STARTED')
+        self.queue.put("STARTED")
 
         # Create the executor
         try:
             if self.docker:
                 host = Host(images_cache=self.images_cache, raise_on_errors=False)
-                executor = DockerExecutor(host, self.prefix, self.data, cache=self.cache)
+                executor = DockerExecutor(
+                    host, self.prefix, self.data, cache=self.cache
+                )
             else:
                 executor = LocalExecutor(self.prefix, self.data, cache=self.cache)
 
             if not executor.valid:
-                self.queue.put(dict(
-                    error = "Failed to load the execution information",
-                    details = executor.errors
-                ))
+                self.queue.put(
+                    dict(
+                        error="Failed to load the execution information",
+                        details=executor.errors,
+                    )
+                )
                 return
 
             # Execute the algorithm
             with executor:
                 result = executor.process()
 
-            self.queue.put(dict(
-                result = result
-            ))
+            self.queue.put(dict(result=result))
         except:
             import traceback
-            self.queue.put(dict(
-                system_error = traceback.format_exc()
-            ))
+
+            self.queue.put(dict(system_error=traceback.format_exc()))
 
         self.queue.close()
 
@@ -137,7 +143,7 @@ class ExecutionProcess(multiprocessing.Process):
         return 0
 
 
-#----------------------------------------------------------
+# ----------------------------------------------------------
 
 
 def connect_to_scheduler(address, name):
@@ -148,8 +154,8 @@ def connect_to_scheduler(address, name):
         name = six.u(name)
     socket.setsockopt_string(zmq.IDENTITY, name)
 
-    if address.find('://') < 0:
-        address = 'tcp://' + address
+    if address.find("://") < 0:
+        address = "tcp://" + address
 
     socket.connect(address)
     logger.info("Connected to '%s'", address)
@@ -171,8 +177,12 @@ def connect_to_scheduler(address, name):
         response = socket.recv()
 
         if response != WorkerController.ACK:
-            logger.error("Can't talk with the scheduler at '%s', expected '%s', got '%s'",
-                         address, WorkerController.ACK, response)
+            logger.error(
+                "Can't talk with the scheduler at '%s', expected '%s', got '%s'",
+                address,
+                WorkerController.ACK,
+                response,
+            )
             socket.setsockopt(zmq.LINGER, 0)
             socket.close()
             context.destroy()
@@ -190,7 +200,7 @@ def connect_to_scheduler(address, name):
     return (context, socket, poller)
 
 
-#----------------------------------------------------------
+# ----------------------------------------------------------
 
 
 def main(user_input=None):
@@ -201,40 +211,38 @@ def main(user_input=None):
         arguments = sys.argv[1:]
 
     prog = os.path.basename(sys.argv[0])
-    completions = dict(
-        prog=prog,
-        version=__version__,
-        hostname=gethostname(),
-    )
+    completions = dict(prog=prog, version=__version__, hostname=gethostname())
     args = docopt(
         __doc__ % completions,
         argv=arguments,
         options_first=True,
-        version='v%s' % __version__,
+        version="v%s" % __version__,
     )
 
-
     # Setup the logging
-    formatter = logging.Formatter(fmt="[%(asctime)s - Worker '" + args['--name'] + \
-                                      "' - %(name)s] %(levelname)s: %(message)s",
-                                  datefmt="%d/%b/%Y %H:%M:%S")
+    formatter = logging.Formatter(
+        fmt="[%(asctime)s - Worker '"
+        + args["--name"]
+        + "' - %(name)s] %(levelname)s: %(message)s",
+        datefmt="%d/%b/%Y %H:%M:%S",
+    )
 
     handler = logging.StreamHandler()
     handler.setFormatter(formatter)
 
-    beat_core_logger = logging.getLogger('beat.core')
+    beat_core_logger = logging.getLogger("beat.core")
     beat_core_logger.addHandler(handler)
 
-    beat_backend_logger = logging.getLogger('beat.backend.python')
+    beat_backend_logger = logging.getLogger("beat.backend.python")
     beat_backend_logger.addHandler(handler)
 
-    if args['--verbose'] == 1:
+    if args["--verbose"] == 1:
         beat_core_logger.setLevel(logging.INFO)
         beat_backend_logger.setLevel(logging.INFO)
-    elif args['--verbose'] == 2:
+    elif args["--verbose"] == 2:
         beat_core_logger.setLevel(logging.DEBUG)
         beat_backend_logger.setLevel(logging.INFO)
-    elif args['--verbose'] >= 3:
+    elif args["--verbose"] >= 3:
         beat_core_logger.setLevel(logging.DEBUG)
         beat_backend_logger.setLevel(logging.DEBUG)
     else:
@@ -244,21 +252,22 @@ def main(user_input=None):
     global logger
     logger = logging.getLogger(__name__)
 
-
     # Check the prefix path
-    prefix = args['--prefix'] if args['--prefix'] is not None else '.'
+    prefix = args["--prefix"] if args["--prefix"] is not None else "."
     if not os.path.exists(prefix):
         logger.error("Prefix not found at: '%s'", prefix)
         return 1
 
-
     # Check the cache path
-    cache = args['--cache'] if args['--cache'] is not None else os.path.join(prefix, 'cache')
+    cache = (
+        args["--cache"]
+        if args["--cache"] is not None
+        else os.path.join(prefix, "cache")
+    )
     if not os.path.exists(cache):
         logger.error("Cache not found at: '%s'", cache)
         return 1
 
-
     # Install a signal handler
     def handler(signum, frame):
         # Ignore further signals
@@ -272,33 +281,34 @@ def main(user_input=None):
     signal.signal(signal.SIGTERM, handler)
     signal.signal(signal.SIGINT, handler)
 
-
     # (If necessary) Docker-related initialisations
     docker_images_cache = None
     docker_network_name = None
     docker_port_range = None
-    if args['--docker']:
-        docker_images_cache = os.path.join(tempfile.gettempdir(), 'beat-docker-images.json')
+    if args["--docker"]:
+        docker_images_cache = os.path.join(
+            tempfile.gettempdir(), "beat-docker-images.json"
+        )
         logger.info("Using docker images cache: '%s'", docker_images_cache)
         host = Host(images_cache=docker_images_cache, raise_on_errors=False)
 
-        docker_network_name = args.get('--docker-network', None)
+        docker_network_name = args.get("--docker-network", None)
         if docker_network_name:
             logger.info("Using docker network: '%s'", docker_network_name)
 
-        docker_port_range = args.get('--port-range', None)
+        docker_port_range = args.get("--port-range", None)
         if docker_port_range:
-            if len(docker_port_range.split(':')) != 2:
+            if len(docker_port_range.split(":")) != 2:
                 logger.error("Invalid port range %s" % docker_port_range)
                 return 1
 
-
     # Establish a connection with the scheduler
-    (context, socket, poller) = connect_to_scheduler(args['<scheduler_address>'], args['--name'])
+    (context, socket, poller) = connect_to_scheduler(
+        args["<scheduler_address>"], args["--name"]
+    )
     if context is None:
         return 1
 
-
     # Process the requests
     execution_processes = []
     scheduler_available = True
@@ -307,7 +317,9 @@ def main(user_input=None):
     while not stop:
         # If necessary, wait for the comeback of the scheduler
         if not scheduler_available:
-            (context, socket, poller) = connect_to_scheduler(args['<scheduler_address>'], args['--name'])
+            (context, socket, poller) = connect_to_scheduler(
+                args["<scheduler_address>"], args["--name"]
+            )
             if context is None:
                 break
             scheduler_available = True
@@ -321,56 +333,46 @@ def main(user_input=None):
 
             execution_process.join()
 
-            if 'result' in result:
-                content = simplejson.dumps(result['result'])
+            if "result" in result:
+                content = simplejson.dumps(result["result"])
 
                 status = WorkerController.DONE
-                if result['result']['status'] != 0:
+                if result["result"]["status"] != 0:
                     status = WorkerController.JOB_ERROR
 
                 logger.info("Job #%s completed", execution_process.job_id)
                 logger.debug('send: """%s"""' % content.rstrip())
 
-                message = [
-                    status,
-                    execution_process.job_id,
-                    content.encode(),
-                ]
-            elif 'error' in result:
-                logger.error(result['error'])
+                message = [status, execution_process.job_id, content.encode()]
+            elif "error" in result:
+                logger.error(result["error"])
 
-                message = [
-                    WorkerController.JOB_ERROR,
-                    execution_process.job_id,
-                ]
+                message = [WorkerController.JOB_ERROR, execution_process.job_id]
 
-                message += [k.encode() for k in result['details']]
+                message += [k.encode() for k in result["details"]]
 
             else:
-                logger.error(result['system_error'])
+                logger.error(result["system_error"])
 
                 message = [
                     WorkerController.ERROR,
                     execution_process.job_id,
-                    result['system_error'].encode(),
+                    result["system_error"].encode(),
                 ]
 
             send_multipart(socket, message)
 
             execution_processes.remove(execution_process)
 
-
         if len(execution_processes) == 0:
-            timeout = 1000 # ms
+            timeout = 1000  # ms
         else:
             timeout = 100
 
-
         socks = dict(poller.poll(timeout))
         if not (socket in socks) or (socks[socket] != zmq.POLLIN):
             continue
 
-
         # Read the next command
         parts = socket.recv_multipart()
 
@@ -378,41 +380,44 @@ def main(user_input=None):
 
         logger.debug("recv: %s", command)
 
-
         # Command: execute <job-id> <json-command>
         if command == WorkerController.EXECUTE:
             job_id = parts[1]
             data = simplejson.loads(parts[2])
-            if args['--docker']:
+            if args["--docker"]:
                 if docker_network_name:
-                    data['network_name'] = docker_network_name
+                    data["network_name"] = docker_network_name
                 if docker_port_range:
-                    data['port_range'] = docker_port_range
+                    data["port_range"] = docker_port_range
 
             # Start the execution
-            logger.info("Running '%s' with job id #%s", data['algorithm'], job_id)
+            logger.info("Running '%s' with job id #%s", data["algorithm"], job_id)
 
-            execution_process = ExecutionProcess(multiprocessing.Queue(), job_id, prefix,
-                                                 data, cache, docker=args['--docker'],
-                                                 images_cache=docker_images_cache)
+            execution_process = ExecutionProcess(
+                multiprocessing.Queue(),
+                job_id,
+                prefix,
+                data,
+                cache,
+                docker=args["--docker"],
+                images_cache=docker_images_cache,
+            )
             execution_process.start()
 
             execution_process.queue.get()
 
             execution_processes.append(execution_process)
 
-
         # Command: cancel
         elif command == WorkerController.CANCEL:
             job_id = parts[1]
 
             try:
-                execution_process = [ p for p in execution_processes if p.job_id == job_id ][0]
+                execution_process = [
+                    p for p in execution_processes if p.job_id == job_id
+                ][0]
             except IndexError:
-                parts = [
-                    WorkerController.ERROR,
-                    b"Unknown job: %s" % job_id
-                ]
+                parts = [WorkerController.ERROR, b"Unknown job: %s" % job_id]
                 send_multipart(socket, parts)
                 continue
 
@@ -423,11 +428,7 @@ def main(user_input=None):
             execution_process.join()
             execution_processes.remove(execution_process)
 
-            socket.send_multipart([
-                WorkerController.CANCELLED,
-                job_id,
-            ])
-
+            socket.send_multipart([WorkerController.CANCELLED, job_id])
 
         # Command: scheduler shutdown
         elif command == WorkerController.SCHEDULER_SHUTDOWN:
@@ -442,11 +443,9 @@ def main(user_input=None):
             socket = None
             context = None
 
-
     if socket:
         socket.send(WorkerController.EXIT)
 
-
     # Cleanup
     for execution_process in execution_processes:
         execution_process.terminate()
diff --git a/beat/core/stats.py b/beat/core/stats.py
index 357b5ba90fc48786c6c7f8ac5834515423420e58..89265b8edde279ababce999ba66a745f582bdf1e 100644
--- a/beat/core/stats.py
+++ b/beat/core/stats.py
@@ -1,29 +1,38 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
+
 
 """
 =====
@@ -78,7 +87,7 @@ class Statistics(object):
         if data:
             self._load(data)  # also runs validation
         else:
-            self._data, self.errors = prototypes.load('statistics')  # also validates
+            self._data, self.errors = prototypes.load("statistics")  # also validates
 
     def _load(self, data):
         """Loads the statistics
@@ -97,70 +106,65 @@ class Statistics(object):
 
         if not isinstance(data, dict):  # user has passed a file pointer
             if not os.path.exists(data):
-                self.errors.append('File not found: %s' % data)
+                self.errors.append("File not found: %s" % data)
                 return
 
         # this runs basic validation, including JSON loading if required
-        self._data, self.errors = schema.validate('statistics', data)
-        if self.errors: return  # don't proceed with the rest of validation
-
+        self._data, self.errors = schema.validate("statistics", data)
+        if self.errors:
+            return  # don't proceed with the rest of validation
 
     @property
     def schema_version(self):
         """Returns the schema version"""
 
-        return self.data.get('schema_version', 1)
-
+        return self.data.get("schema_version", 1)
 
     @property
     def cpu(self):
         """Returns only CPU information"""
 
-        return self._data['cpu']
+        return self._data["cpu"]
 
     @cpu.setter
     def cpu(self, data):
         """Sets the CPU information"""
 
-        for key in ('user', 'system', 'total'):
-            self._data['cpu'][key] = data[key]
-
-        for key in ('voluntary', 'involuntary'):
-            self._data['cpu']['context_switches'][key] = data['context_switches'][key]
+        for key in ("user", "system", "total"):
+            self._data["cpu"][key] = data[key]
 
+        for key in ("voluntary", "involuntary"):
+            self._data["cpu"]["context_switches"][key] = data["context_switches"][key]
 
     @property
     def memory(self):
         """Returns only memory information"""
 
-        return self._data['memory']
-
+        return self._data["memory"]
 
     @memory.setter
     def memory(self, data):
         """Sets only the memory information"""
 
-        for key in ('rss',): self._data['memory'][key] = data[key]
-
+        for key in ("rss",):
+            self._data["memory"][key] = data[key]
 
     @property
     def data(self):
         """Returns only I/O information"""
 
-        return self._data['data']
-
+        return self._data["data"]
 
     @data.setter
     def data(self, data):
         """Sets only the I/O information"""
 
-        for key in ('volume', 'blocks', 'time'):
-            self._data['data'][key]['read'] = data[key]['read']
-            self._data['data'][key]['write'] = data[key]['write']
-
-        self._data['data']['files'] = list(data['files'])
-        self._data['network'] = data['network']
+        for key in ("volume", "blocks", "time"):
+            self._data["data"][key]["read"] = data[key]["read"]
+            self._data["data"][key]["write"] = data[key]["write"]
 
+        self._data["data"]["files"] = list(data["files"])
+        self._data["network"] = data["network"]
 
     @property
     def valid(self):
@@ -168,7 +172,6 @@ class Statistics(object):
 
         return not bool(self.errors)
 
-
     def __add__(self, other):
         """Adds two statistics data blocks"""
 
@@ -176,40 +179,41 @@ class Statistics(object):
         retval += other
         return retval
 
-
     def __iadd__(self, other):
         """Self-add statistics from another block"""
 
-        if not isinstance(other, Statistics): return NotImplemented
+        if not isinstance(other, Statistics):
+            return NotImplemented
 
-        for key in ('user', 'system', 'total'):
-            self._data['cpu'][key] += other._data['cpu'][key]
+        for key in ("user", "system", "total"):
+            self._data["cpu"][key] += other._data["cpu"][key]
 
-        for key in ('voluntary', 'involuntary'):
-            self._data['cpu']['context_switches'][key] += \
-                    other._data['cpu']['context_switches'][key]
+        for key in ("voluntary", "involuntary"):
+            self._data["cpu"]["context_switches"][key] += other._data["cpu"][
+                "context_switches"
+            ][key]
 
-        for key in ('rss', ): #gets the maximum between the two
-            self._data['memory'][key] = max(other._data['memory'][key],
-                self._data['memory'][key])
+        for key in ("rss",):  # gets the maximum between the two
+            self._data["memory"][key] = max(
+                other._data["memory"][key], self._data["memory"][key]
+            )
 
-        for key in ('volume', 'blocks', 'time'):
-            self._data['data'][key]['read'] += other._data['data'][key]['read']
-            self._data['data'][key]['write'] += other._data['data'][key]['write']
+        for key in ("volume", "blocks", "time"):
+            self._data["data"][key]["read"] += other._data["data"][key]["read"]
+            self._data["data"][key]["write"] += other._data["data"][key]["write"]
 
-        self._data['data']['files'] += other._data['data']['files']
+        self._data["data"]["files"] += other._data["data"]["files"]
 
-        self._data['data']['network']['wait_time'] += \
-                other._data['data']['network']['wait_time']
+        self._data["data"]["network"]["wait_time"] += other._data["data"]["network"][
+            "wait_time"
+        ]
 
         return self
 
-
     def __str__(self):
 
         return self.as_json(2)
 
-
     def as_json(self, indent=None):
         """Returns self as as JSON
 
@@ -222,19 +226,19 @@ class Statistics(object):
 
         return simplejson.dumps(self._data, indent=indent)
 
-
     def as_dict(self):
         """Returns self as a dictionary"""
 
         return self._data
 
-
     def write(self, f):
         """Writes contents to a file-like object"""
 
-        if hasattr(f, 'write'): f.write(str(self))
+        if hasattr(f, "write"):
+            f.write(str(self))
         else:
-            with open(f, 'wt') as fobj: fobj.write(str(self))
+            with open(f, "wt") as fobj:
+                fobj.write(str(self))
 
 
 # ----------------------------------------------------------
@@ -254,36 +258,38 @@ def cpu_statistics(start, end):
 
     """
 
-    if 'system_cpu_usage' not in end:
+    if "system_cpu_usage" not in end:
         return {
-                'user': 0.0,
-                'system': 0.0,
-                'total': 0.0,
-                'percent': 0.0,
-                'processors': 1,
-               }
+            "user": 0.0,
+            "system": 0.0,
+            "total": 0.0,
+            "percent": 0.0,
+            "processors": 1,
+        }
 
     if start is not None:
-        user_cpu = end['cpu_usage']['total_usage'] - \
-            start['cpu_usage']['total_usage']
-        total_cpu = end['system_cpu_usage'] - start['system_cpu_usage']
+        user_cpu = end["cpu_usage"]["total_usage"] - start["cpu_usage"]["total_usage"]
+        total_cpu = end["system_cpu_usage"] - start["system_cpu_usage"]
 
     else:
-        user_cpu = end['cpu_usage']['total_usage']
-        total_cpu = end['system_cpu_usage']
+        user_cpu = end["cpu_usage"]["total_usage"]
+        total_cpu = end["system_cpu_usage"]
 
-    user_cpu /= 1000000000.  # in seconds
-    total_cpu /= 1000000000.  # in seconds
-    processors = len(end['cpu_usage']['percpu_usage']) if \
-        end['cpu_usage']['percpu_usage'] is not None else 1
+    user_cpu /= 1000000000.0  # in seconds
+    total_cpu /= 1000000000.0  # in seconds
+    processors = (
+        len(end["cpu_usage"]["percpu_usage"])
+        if end["cpu_usage"]["percpu_usage"] is not None
+        else 1
+    )
 
     return {
-            'user': user_cpu,
-            'system': 0.,
-            'total': total_cpu,
-            'percent': 100.*processors*user_cpu/total_cpu if total_cpu else 0.,
-            'processors': processors,
-           }
+        "user": user_cpu,
+        "system": 0.0,
+        "total": total_cpu,
+        "percent": 100.0 * processors * user_cpu / total_cpu if total_cpu else 0.0,
+        "processors": processors,
+    }
 
 
 # ----------------------------------------------------------
@@ -302,11 +308,11 @@ def memory_statistics(data):
 
     """
 
-    limit = float(data['limit'])
-    memory = float(data['max_usage'])
+    limit = float(data["limit"])
+    memory = float(data["max_usage"])
 
     return {
-            'rss': memory,
-            'limit': limit,
-            'percent': 100.*memory/limit if limit else 0.,
-           }
+        "rss": memory,
+        "limit": limit,
+        "percent": 100.0 * memory / limit if limit else 0.0,
+    }
diff --git a/beat/core/test/__init__.py b/beat/core/test/__init__.py
index 397e5c69a12b77d261bb6db47ee12207d38c56bd..2f67c7498c758333bb75091db873a1d06d3e847e 100644
--- a/beat/core/test/__init__.py
+++ b/beat/core/test/__init__.py
@@ -1,30 +1,37 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
-
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
 
 # Basic setup for slow tests
 
@@ -36,69 +43,67 @@ import tempfile
 import pkg_resources
 import logging
 
-if sys.platform == 'darwin':
-    tmp_prefix = tempfile.mkdtemp(prefix=__name__,
-                                  suffix='.tmpdir',
-                                  dir='/tmp')
-    prefix_folder = tempfile.mkdtemp(prefix=__name__,
-                                     suffix='.prefix',
-                                     dir='/tmp')
+if sys.platform == "darwin":
+    tmp_prefix = tempfile.mkdtemp(prefix=__name__, suffix=".tmpdir", dir="/tmp")
+    prefix_folder = tempfile.mkdtemp(prefix=__name__, suffix=".prefix", dir="/tmp")
 else:
-    tmp_prefix = tempfile.mkdtemp(prefix=__name__,
-                                  suffix='.tmpdir')
-    prefix_folder = tempfile.mkdtemp(prefix=__name__,
-                                     suffix='.prefix')
+    tmp_prefix = tempfile.mkdtemp(prefix=__name__, suffix=".tmpdir")
+    prefix_folder = tempfile.mkdtemp(prefix=__name__, suffix=".prefix")
 
 
-prefix = os.path.join(prefix_folder, 'prefix')
+prefix = os.path.join(prefix_folder, "prefix")
 
-DOCKER_NETWORK_TEST_ENABLED = os.environ.get('DOCKER_NETWORK_TEST_ENABLED', False) == 'True'
-network_name = os.environ.get('DOCKER_TEST_NETWORK', 'beat_core_test_network')
+DOCKER_NETWORK_TEST_ENABLED = (
+    os.environ.get("DOCKER_NETWORK_TEST_ENABLED", False) == "True"
+)
+network_name = os.environ.get("DOCKER_TEST_NETWORK", "beat_core_test_network")
 network = None
 
 # Setup the logging system
-VERBOSE_TEST_LOGGING = os.environ.get('VERBOSE_TEST_LOGGING', False) == 'True'
-VERBOSE_BCP_LOGGING = os.environ.get('VERBOSE_BCP_LOGGING', False) == 'True'
+VERBOSE_TEST_LOGGING = os.environ.get("VERBOSE_TEST_LOGGING", False) == "True"
+VERBOSE_BCP_LOGGING = os.environ.get("VERBOSE_BCP_LOGGING", False) == "True"
 
 if VERBOSE_TEST_LOGGING:
-    formatter = logging.Formatter(fmt="[%(asctime)s - TESTS - "
-                                      "%(name)s] %(levelname)s: %(message)s",
-                                  datefmt="%d/%b/%Y %H:%M:%S")
+    formatter = logging.Formatter(
+        fmt="[%(asctime)s - TESTS - " "%(name)s] %(levelname)s: %(message)s",
+        datefmt="%d/%b/%Y %H:%M:%S",
+    )
 
     handler = logging.StreamHandler()
     handler.setFormatter(formatter)
 
-    for logger_name in ['beat.core', 'beat.backend.python']:
-      logger = logging.getLogger(logger_name)
-      logger.setLevel(logging.DEBUG)
-      logger.addHandler(handler)
+    for logger_name in ["beat.core", "beat.backend.python"]:
+        logger = logging.getLogger(logger_name)
+        logger.setLevel(logging.DEBUG)
+        logger.addHandler(handler)
 
 
 def setup_package():
     prefixes = [
-        pkg_resources.resource_filename('beat.backend.python.test', 'prefix'),
-        pkg_resources.resource_filename('beat.core.test', 'prefix')
+        pkg_resources.resource_filename("beat.backend.python.test", "prefix"),
+        pkg_resources.resource_filename("beat.core.test", "prefix"),
     ]
 
     for path in prefixes:
-        subprocess.check_call(['rsync', '-arz', path, prefix_folder])
+        subprocess.check_call(["rsync", "-arz", path, prefix_folder])
 
     if DOCKER_NETWORK_TEST_ENABLED:
         import docker
+
         client = docker.from_env()
         try:
             network = client.networks.get(network_name)
         except docker.errors.NotFound:
-            subnet = os.environ.get('DOCKER_TEST_SUBNET', '193.169.0.0/24')
-            gateway = os.environ.get('DOCKER_TEST_GATEWAY', '193.169.0.254')
-            ipam_pool = docker.types.IPAMPool(subnet=subnet,
-                                          gateway=gateway)
+            subnet = os.environ.get("DOCKER_TEST_SUBNET", "193.169.0.0/24")
+            gateway = os.environ.get("DOCKER_TEST_GATEWAY", "193.169.0.254")
+            ipam_pool = docker.types.IPAMPool(subnet=subnet, gateway=gateway)
 
             ipam_config = docker.types.IPAMConfig(pool_configs=[ipam_pool])
 
-            network = client.networks.create(network_name,
-                                             driver="bridge",
-                                             ipam=ipam_config)
+            network = client.networks.create(
+                network_name, driver="bridge", ipam=ipam_config
+            )
+
 
 def teardown_package():
     if os.path.exists(tmp_prefix):
diff --git a/beat/core/test/cpu_stress.py b/beat/core/test/cpu_stress.py
index 48883a2b600270d0b18d7d87851e00d8c98dc506..deafb29fefa0eb295783f925b9b0d2048caaeebd 100644
--- a/beat/core/test/cpu_stress.py
+++ b/beat/core/test/cpu_stress.py
@@ -1,44 +1,54 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
-
-
-'''A stress-test for the CPUs of a machine
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
+
+
+"""A stress-test for the CPUs of a machine
 
 usage: <script> 2
 
 Runs 2x CPU stress function
-'''
+"""
 
 import sys
 import multiprocessing
 
+
 def test(x):
     try:
-        while True: x * x
+        while True:
+            x * x
     except (KeyboardInterrupt, SystemExit):
         return x * x
 
diff --git a/beat/core/test/mocks.py b/beat/core/test/mocks.py
index b282ca5c5efa60e4ad41e49b1567f47c850f9633..c2176acc1f7a22aaa354aabba6f583f9947a77a7 100644
--- a/beat/core/test/mocks.py
+++ b/beat/core/test/mocks.py
@@ -1,29 +1,37 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2017 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.backend.python module of the BEAT platform.   #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
 
 
 from ..data import DataSource
@@ -31,14 +39,17 @@ from ..data import DataSink
 
 
 class MockDataSource(DataSource):
-
     def __init__(self, data, indexes):
         self.data = list(data)
         self.indexes = list(indexes)
         self.current = 0
 
     def next(self):
-        result = (self.data[self.current], self.indexes[self.current][0], self.indexes[self.current][1])
+        result = (
+            self.data[self.current],
+            self.indexes[self.current][0],
+            self.indexes[self.current][1],
+        )
         self.current += 1
         return result
 
@@ -46,11 +57,10 @@ class MockDataSource(DataSource):
         return self.current < sum(1 for i in self.data)
 
 
-#----------------------------------------------------------
+# ----------------------------------------------------------
 
 
 class MockDataSink(DataSink):
-
     class WrittenData:
         def __init__(self, data, start, end):
             self.data = data
@@ -63,20 +73,20 @@ class MockDataSink(DataSink):
         self.dataformat = dataformat
 
     def write(self, data, start_data_index, end_data_index):
-        if not(self.can_write): raise IOError
+        if not (self.can_write):
+            raise IOError
         self.written.append(
-                MockDataSink.WrittenData(data, start_data_index, end_data_index)
-                )
+            MockDataSink.WrittenData(data, start_data_index, end_data_index)
+        )
 
     def isConnected(self):
         return True
 
 
-#----------------------------------------------------------
+# ----------------------------------------------------------
 
 
 class MockDataSource_Crash(DataSource):
-
     def next(self):
         a = b
 
diff --git a/beat/core/test/prefix/algorithms/schema/invalid_loop_channel/1.py b/beat/core/test/prefix/algorithms/schema/invalid_loop_channel/1.py
index 157d8ffd163fee0033b59c8a023119e46ef76e63..cf1db59c58431f711ee9b5aad8165100888b9e9b 100644
--- a/beat/core/test/prefix/algorithms/schema/invalid_loop_channel/1.py
+++ b/beat/core/test/prefix/algorithms/schema/invalid_loop_channel/1.py
@@ -1,32 +1,40 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2018 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.backend.python module of the BEAT platform.   #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
 
-class Algorithm:
 
+class Algorithm:
     def validate(self, result):
         value = result.value
 
diff --git a/beat/core/test/prefix/algorithms/schema/invalid_loop_output/1.py b/beat/core/test/prefix/algorithms/schema/invalid_loop_output/1.py
index 157d8ffd163fee0033b59c8a023119e46ef76e63..cf1db59c58431f711ee9b5aad8165100888b9e9b 100644
--- a/beat/core/test/prefix/algorithms/schema/invalid_loop_output/1.py
+++ b/beat/core/test/prefix/algorithms/schema/invalid_loop_output/1.py
@@ -1,32 +1,40 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2018 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.backend.python module of the BEAT platform.   #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
 
-class Algorithm:
 
+class Algorithm:
     def validate(self, result):
         value = result.value
 
diff --git a/beat/core/test/prefix/algorithms/schema/invalid_loop_type/1.py b/beat/core/test/prefix/algorithms/schema/invalid_loop_type/1.py
index 157d8ffd163fee0033b59c8a023119e46ef76e63..cf1db59c58431f711ee9b5aad8165100888b9e9b 100644
--- a/beat/core/test/prefix/algorithms/schema/invalid_loop_type/1.py
+++ b/beat/core/test/prefix/algorithms/schema/invalid_loop_type/1.py
@@ -1,32 +1,40 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2018 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.backend.python module of the BEAT platform.   #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
 
-class Algorithm:
 
+class Algorithm:
     def validate(self, result):
         value = result.value
 
diff --git a/beat/core/test/prefix/algorithms/schema/invalid_loop_user_type/1.py b/beat/core/test/prefix/algorithms/schema/invalid_loop_user_type/1.py
index 157d8ffd163fee0033b59c8a023119e46ef76e63..cf1db59c58431f711ee9b5aad8165100888b9e9b 100644
--- a/beat/core/test/prefix/algorithms/schema/invalid_loop_user_type/1.py
+++ b/beat/core/test/prefix/algorithms/schema/invalid_loop_user_type/1.py
@@ -1,32 +1,40 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2018 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.backend.python module of the BEAT platform.   #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
 
-class Algorithm:
 
+class Algorithm:
     def validate(self, result):
         value = result.value
 
diff --git a/beat/core/test/prefix/algorithms/user/db_input_loop/1.py b/beat/core/test/prefix/algorithms/user/db_input_loop/1.py
index bd479ac0c5df95c0c861ccddc2fdf3bc6d867ef7..40380e651dd61192a32561d900744c9b15af46c0 100644
--- a/beat/core/test/prefix/algorithms/user/db_input_loop/1.py
+++ b/beat/core/test/prefix/algorithms/user/db_input_loop/1.py
@@ -1,49 +1,58 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2018 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.backend.python module of the BEAT platform.   #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
+
 
 import numpy as np
 
-class Algorithm:
 
+class Algorithm:
     def __init__(self):
         self.threshold = None
         self.max = 0
 
     def setup(self, parameters):
-        self.threshold = parameters['threshold']
+        self.threshold = parameters["threshold"]
         return True
 
     def prepare(self, data_loaders):
-        data_loader = data_loaders.loaderOf('in')
+        data_loader = data_loaders.loaderOf("in")
 
         for i in range(data_loader.count()):
-            view = data_loader.view('in', i)
+            view = data_loader.view("in", i)
             (data, _, _) = view[view.count() - 1]
-            value = data['in'].value
+            value = data["in"].value
             self.max += value
 
         return True
@@ -52,4 +61,4 @@ class Algorithm:
         value = result.value
         result = value > self.threshold and value < self.max
         delta = self.max - value
-        return (result, {'value': np.int32(delta)})
+        return (result, {"value": np.int32(delta)})
diff --git a/beat/core/test/prefix/algorithms/user/db_input_loop_user/1.py b/beat/core/test/prefix/algorithms/user/db_input_loop_user/1.py
index 9c0e493ab6f7399614cdb585cdb09909722faf62..b733ecf353c9038181f2e6f50d2fa71e36e2b688 100644
--- a/beat/core/test/prefix/algorithms/user/db_input_loop_user/1.py
+++ b/beat/core/test/prefix/algorithms/user/db_input_loop_user/1.py
@@ -1,53 +1,59 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2018 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.backend.python module of the BEAT platform.   #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
+
+
 import numpy as np
 
-class Algorithm:
 
+class Algorithm:
     def process(self, data_loaders, outputs, loop_channel):
         cnt = 1
-        is_valid, delta = loop_channel.validate({'value': np.int32(cnt)})
+        is_valid, delta = loop_channel.validate({"value": np.int32(cnt)})
         while not is_valid:
             cnt = cnt + 1
-            is_valid, delta = loop_channel.validate({'value': np.int32(cnt)})
+            is_valid, delta = loop_channel.validate({"value": np.int32(cnt)})
 
         delta = delta.value
 
-        data_loader = data_loaders.loaderOf('in')
+        data_loader = data_loaders.loaderOf("in")
 
         for i in range(data_loader.count()):
-            view = data_loader.view('in', i)
+            view = data_loader.view("in", i)
             (data, _, end) = view[view.count() - 1]
-            value = data['in'].value
+            value = data["in"].value
             new_value = (value + cnt) * delta
-            outputs['out'].write({
-                    'value': np.int32(new_value),
-                },
-                end
-            )
+            outputs["out"].write({"value": np.int32(new_value)}, end)
 
         return True
diff --git a/beat/core/test/prefix/algorithms/user/for_dep/1.py b/beat/core/test/prefix/algorithms/user/for_dep/1.py
index f7f6f5b7f0504e07bd4ad4a97d6ca405ee299eb8..164f5ad741e0db32021d2f210243cf9871ba449b 100644
--- a/beat/core/test/prefix/algorithms/user/for_dep/1.py
+++ b/beat/core/test/prefix/algorithms/user/for_dep/1.py
@@ -1,31 +1,39 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
 
-class Algorithm:
 
+class Algorithm:
     def process(self, inputs, outputs):
         return True
diff --git a/beat/core/test/prefix/algorithms/user/integers_add/1.py b/beat/core/test/prefix/algorithms/user/integers_add/1.py
index 0b9cc585d21945cbf81ad83e79d0e4ff17b2346e..5888517b416933b9601995f52b46cd5588d598a5 100644
--- a/beat/core/test/prefix/algorithms/user/integers_add/1.py
+++ b/beat/core/test/prefix/algorithms/user/integers_add/1.py
@@ -1,41 +1,49 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
 
-class Algorithm:
 
+class Algorithm:
     def __init__(self):
         self.offset = 1
 
     def setup(self, parameters):
-        self.offset = parameters['offset']
+        self.offset = parameters["offset"]
         return True
 
     def process(self, inputs, outputs):
-        outputs['out_data'].write({
-            'value': lib.sum(inputs['in_data'].data.value, self.offset)
-            })
+        outputs["out_data"].write(
+            {"value": lib.sum(inputs["in_data"].data.value, self.offset)}
+        )
         return True
diff --git a/beat/core/test/prefix/algorithms/user/integers_add_v2/1.py b/beat/core/test/prefix/algorithms/user/integers_add_v2/1.py
index 567067907cd06ac260c72fb420dd267c989026a6..8003969306953c2163eb129095705f16f90cb849 100644
--- a/beat/core/test/prefix/algorithms/user/integers_add_v2/1.py
+++ b/beat/core/test/prefix/algorithms/user/integers_add_v2/1.py
@@ -1,52 +1,56 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
 
-class Algorithm:
 
+class Algorithm:
     def __init__(self):
         self.offset = 1
 
     def setup(self, parameters):
-        self.sync = parameters['sync']
-        self.offset = parameters['offset']
+        self.sync = parameters["sync"]
+        self.offset = parameters["offset"]
         return True
 
     def process(self, inputs, outputs):
-        data_loader = data_loaders.loaderOf('in1')
+        data_loader = data_loaders.loaderOf("in1")
 
         for i in range(data_loader.count(self.sync)):
             view = data_loader.view(self.sync, i)
 
             (data, start, end) = view[view.count() - 1]
 
-            outputs['out'].write({
-                    'value': data['in1'].value + data['in2'].value,
-                },
-                end
-            )
+            outputs["out"].write({"value": data["in1"].value + data["in2"].value}, end)
 
         return True
diff --git a/beat/core/test/prefix/algorithms/user/integers_analysis/1.py b/beat/core/test/prefix/algorithms/user/integers_analysis/1.py
index 8d8dd7be5b038aa727f6711b8ea9d2bce9d04bd1..0c6316d492ba586eec01085e8f5ce574ac078d4e 100644
--- a/beat/core/test/prefix/algorithms/user/integers_analysis/1.py
+++ b/beat/core/test/prefix/algorithms/user/integers_analysis/1.py
@@ -1,45 +1,51 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
+
 
 import numpy
 
-class Algorithm:
 
+class Algorithm:
     def __init__(self):
         self.sum = 0
         self.nb = 0
 
     def process(self, inputs, output):
-        self.sum += inputs['input'].data.value
+        self.sum += inputs["input"].data.value
         self.nb += 1
 
-        if not(inputs.hasMoreData()):
-            output.write({
-                'sum': numpy.int32(self.sum),
-                'nb': numpy.int32(self.nb),
-            })
+        if not (inputs.hasMoreData()):
+            output.write({"sum": numpy.int32(self.sum), "nb": numpy.int32(self.nb)})
         return True
diff --git a/beat/core/test/prefix/algorithms/user/integers_array_generator/1.py b/beat/core/test/prefix/algorithms/user/integers_array_generator/1.py
index 9c33a5cce7b65c6d3fa717d1f943f3c937333b72..cce40ed60a4059e7a537fbd98e01243651162869 100644
--- a/beat/core/test/prefix/algorithms/user/integers_array_generator/1.py
+++ b/beat/core/test/prefix/algorithms/user/integers_array_generator/1.py
@@ -1,44 +1,54 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
+
 
 import numpy as np
 
 
 class Algorithm:
-
     def setup(self, parameters):
         np.random.seed(0)
         return True
 
     def process(self, inputs, outputs):
-        val = np.int32(np.random.randint(0, max(1, abs(inputs['in_data'].data.value)), size=(1000000,)))
+        val = np.int32(
+            np.random.randint(
+                0, max(1, abs(inputs["in_data"].data.value)), size=(1000000,)
+            )
+        )
 
-        outputs['out_data'].write({
-          'value': val
-        })
+        outputs["out_data"].write({"value": val})
 
         return True
diff --git a/beat/core/test/prefix/algorithms/user/integers_array_sum/1.py b/beat/core/test/prefix/algorithms/user/integers_array_sum/1.py
index c71219332376a24e3bdba555fe07c124dac24ade..cb3a59b2be6341861da345a0a8dac733fd358183 100644
--- a/beat/core/test/prefix/algorithms/user/integers_array_sum/1.py
+++ b/beat/core/test/prefix/algorithms/user/integers_array_sum/1.py
@@ -1,38 +1,46 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
+
 
 import numpy as np
 
 
 class Algorithm:
-
     def process(self, inputs, outputs):
-        outputs['out_data'].write({
-          'value': np.int32(inputs['in_data'].data.value.sum())
-        })
+        outputs["out_data"].write(
+            {"value": np.int32(inputs["in_data"].data.value.sum())}
+        )
 
         return True
diff --git a/beat/core/test/prefix/algorithms/user/integers_crash/1.py b/beat/core/test/prefix/algorithms/user/integers_crash/1.py
index a6e8cc70c7fb9019242eb3cf9e0d3fe602143db6..bec1160e777e8b957341e054c47d473a71b89875 100644
--- a/beat/core/test/prefix/algorithms/user/integers_crash/1.py
+++ b/beat/core/test/prefix/algorithms/user/integers_crash/1.py
@@ -1,32 +1,40 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
 
-class Algorithm:
 
+class Algorithm:
     def process(self, inputs, outputs):
         a = b
         return True
diff --git a/beat/core/test/prefix/algorithms/user/integers_echo/1.py b/beat/core/test/prefix/algorithms/user/integers_echo/1.py
index fe18d9eec5c5504c0dd605f1ecf4ee724c59f506..014c29a841fb667b6045dca21d99cea13bcbe781 100644
--- a/beat/core/test/prefix/algorithms/user/integers_echo/1.py
+++ b/beat/core/test/prefix/algorithms/user/integers_echo/1.py
@@ -1,32 +1,40 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
 
-class Algorithm:
 
+class Algorithm:
     def process(self, inputs, outputs):
-        outputs['out_data'].write(inputs['in_data'].data)
+        outputs["out_data"].write(inputs["in_data"].data)
         return True
diff --git a/beat/core/test/prefix/algorithms/user/integers_echo_analyzer/1.py b/beat/core/test/prefix/algorithms/user/integers_echo_analyzer/1.py
index d648a5c5b95f1de0f0205bae44df5ad722e58469..6056dfaa0c4a8e51408000e7d7e7dd02c2090143 100644
--- a/beat/core/test/prefix/algorithms/user/integers_echo_analyzer/1.py
+++ b/beat/core/test/prefix/algorithms/user/integers_echo_analyzer/1.py
@@ -1,32 +1,40 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
 
-class Algorithm:
 
+class Algorithm:
     def process(self, inputs, output):
-        output.write({'out_data': inputs['in_data'].data.value})
+        output.write({"out_data": inputs["in_data"].data.value})
         return True
diff --git a/beat/core/test/prefix/algorithms/user/integers_echo_analyzer_v2/1.py b/beat/core/test/prefix/algorithms/user/integers_echo_analyzer_v2/1.py
index 5c961d3456adf6e98a516835b96bc622ab1d218f..d6a9eca3f69215f9450ff96bccfb74ef7f971d0c 100644
--- a/beat/core/test/prefix/algorithms/user/integers_echo_analyzer_v2/1.py
+++ b/beat/core/test/prefix/algorithms/user/integers_echo_analyzer_v2/1.py
@@ -1,32 +1,40 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
 
-class Algorithm:
 
+class Algorithm:
     def process(self, inputs, data_loaders, output):
-        output.write({'out_data': inputs['in_data'].data.value})
+        output.write({"out_data": inputs["in_data"].data.value})
         return True
diff --git a/beat/core/test/prefix/algorithms/user/integers_echo_error/1.py b/beat/core/test/prefix/algorithms/user/integers_echo_error/1.py
index 353bb78b047359a66d89820a9210995bde5e8a24..b467d5c3ed4be940ff1430dbd9572e5721a6d12f 100644
--- a/beat/core/test/prefix/algorithms/user/integers_echo_error/1.py
+++ b/beat/core/test/prefix/algorithms/user/integers_echo_error/1.py
@@ -1,33 +1,41 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
 
-class Algorithm:
 
+class Algorithm:
     def process(self, inputs, outputs):
-        error #this error is here on testing purposes
-        outputs['out_data'].write(inputs['in_data'].data)
+        error  # this error is here on testing purposes
+        outputs["out_data"].write(inputs["in_data"].data)
         return True
diff --git a/beat/core/test/prefix/algorithms/user/integers_echo_ignore/1.py b/beat/core/test/prefix/algorithms/user/integers_echo_ignore/1.py
index d6a71ba3eb35ab76b42552a506626b3cf9c751af..1e751d82962c11fb30c94e1568f55eaf2e0c04eb 100644
--- a/beat/core/test/prefix/algorithms/user/integers_echo_ignore/1.py
+++ b/beat/core/test/prefix/algorithms/user/integers_echo_ignore/1.py
@@ -1,40 +1,48 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
 
-class Algorithm:
 
+class Algorithm:
     def __init__(self):
 
         self.ignore = False
 
     def process(self, inputs, outputs):
         if not self.ignore:
-            while inputs['in_data2'].hasMoreData():
-                inputs['in_data2'].next()
+            while inputs["in_data2"].hasMoreData():
+                inputs["in_data2"].next()
             self.ignore = True
-        outputs['out_data'].write(inputs['in_data'].data)
+        outputs["out_data"].write(inputs["in_data"].data)
         return True
diff --git a/beat/core/test/prefix/algorithms/user/integers_echo_slow/1.py b/beat/core/test/prefix/algorithms/user/integers_echo_slow/1.py
index 89eff7c67b8d1ab10fa2dcd9b2f8e65798356b70..846994f242c149d7b431621b0cec5846bd625cf6 100644
--- a/beat/core/test/prefix/algorithms/user/integers_echo_slow/1.py
+++ b/beat/core/test/prefix/algorithms/user/integers_echo_slow/1.py
@@ -1,36 +1,44 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
+
 
 import time
 
 
 class Algorithm:
-
     def process(self, inputs, outputs):
-        time.sleep(.5)
-        outputs['out'].write(inputs['in'].data)
+        time.sleep(0.5)
+        outputs["out"].write(inputs["in"].data)
         return True
diff --git a/beat/core/test/prefix/algorithms/user/integers_mean_analyzer/1.py b/beat/core/test/prefix/algorithms/user/integers_mean_analyzer/1.py
index 81c20dd447ccc58d7d5bb6e5a66dc61e09fcd5a8..050750c9600a89a8ab90e1016f19f4a37dae14f3 100644
--- a/beat/core/test/prefix/algorithms/user/integers_mean_analyzer/1.py
+++ b/beat/core/test/prefix/algorithms/user/integers_mean_analyzer/1.py
@@ -1,43 +1,52 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
+
 
 import numpy
 
-class Algorithm:
 
+class Algorithm:
     def __init__(self):
         self.data = []
 
     def process(self, inputs, output):
-        self.data.append(inputs['in_data'].data.value)
+        self.data.append(inputs["in_data"].data.value)
 
         if not inputs.hasMoreData():
-            output.write({
-                'out_data': numpy.float32(sum(self.data)/float(len(self.data))),
-                })
+            output.write(
+                {"out_data": numpy.float32(sum(self.data) / float(len(self.data)))}
+            )
 
         return True
diff --git a/beat/core/test/prefix/algorithms/user/labelled_integers_sum/1.py b/beat/core/test/prefix/algorithms/user/labelled_integers_sum/1.py
index db5207be666ff7ad5fc1c5e36eb2f70ee35c5677..cf71fabcc8aa3f59d9c96c1669203e1707356359 100644
--- a/beat/core/test/prefix/algorithms/user/labelled_integers_sum/1.py
+++ b/beat/core/test/prefix/algorithms/user/labelled_integers_sum/1.py
@@ -1,44 +1,50 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2017 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
+
 
 import numpy as np
 
 
 class Algorithm:
-
     def __init__(self):
         self.sum = np.int32(0)
 
     def process(self, inputs, outputs):
-        self.sum += inputs['value'].data.value
+        self.sum += inputs["value"].data.value
 
-        if inputs['label'].isDataUnitDone():
-            outputs['result'].write({
-                'value': self.sum
-            })
+        if inputs["label"].isDataUnitDone():
+            outputs["result"].write({"value": self.sum})
 
         return True
diff --git a/beat/core/test/prefix/algorithms/user/no_inputs_declarations/1.py b/beat/core/test/prefix/algorithms/user/no_inputs_declarations/1.py
index f7f6f5b7f0504e07bd4ad4a97d6ca405ee299eb8..164f5ad741e0db32021d2f210243cf9871ba449b 100644
--- a/beat/core/test/prefix/algorithms/user/no_inputs_declarations/1.py
+++ b/beat/core/test/prefix/algorithms/user/no_inputs_declarations/1.py
@@ -1,31 +1,39 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
 
-class Algorithm:
 
+class Algorithm:
     def process(self, inputs, outputs):
         return True
diff --git a/beat/core/test/prefix/algorithms/user/no_outputs_declarations/1.py b/beat/core/test/prefix/algorithms/user/no_outputs_declarations/1.py
index f7f6f5b7f0504e07bd4ad4a97d6ca405ee299eb8..164f5ad741e0db32021d2f210243cf9871ba449b 100644
--- a/beat/core/test/prefix/algorithms/user/no_outputs_declarations/1.py
+++ b/beat/core/test/prefix/algorithms/user/no_outputs_declarations/1.py
@@ -1,31 +1,39 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
 
-class Algorithm:
 
+class Algorithm:
     def process(self, inputs, outputs):
         return True
diff --git a/beat/core/test/prefix/algorithms/user/prepare_error/1.py b/beat/core/test/prefix/algorithms/user/prepare_error/1.py
index bcee88cf30507267557b8bf01230dc362f4d8aae..6a91a5c8bb08d003f4efedfe3ea35fadf0259e68 100644
--- a/beat/core/test/prefix/algorithms/user/prepare_error/1.py
+++ b/beat/core/test/prefix/algorithms/user/prepare_error/1.py
@@ -1,35 +1,43 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
 
-class Algorithm:
 
+class Algorithm:
     def prepare(self, data_loaders):
         return False
 
     def process(self, inputs, data_loaders, outputs):
-        outputs['out_data'].write(inputs['in_data'].data)
+        outputs["out_data"].write(inputs["in_data"].data)
         return True
diff --git a/beat/core/test/prefix/algorithms/user/prepare_success/1.py b/beat/core/test/prefix/algorithms/user/prepare_success/1.py
index 18cfa060429acdd668bc4f9ec424130c85896957..ac7bcb72d5cec4a5a27bd702acfab148c63cd7aa 100644
--- a/beat/core/test/prefix/algorithms/user/prepare_success/1.py
+++ b/beat/core/test/prefix/algorithms/user/prepare_success/1.py
@@ -1,35 +1,43 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
 
-class Algorithm:
 
+class Algorithm:
     def prepare(self, data_loaders):
         return True
 
     def process(self, inputs, data_loaders, outputs):
-        outputs['out_data'].write(inputs['in_data'].data)
+        outputs["out_data"].write(inputs["in_data"].data)
         return True
diff --git a/beat/core/test/prefix/algorithms/user/setup_error/1.py b/beat/core/test/prefix/algorithms/user/setup_error/1.py
index cf5a2056bc2c55f2df7797c2eb034808d896e77a..f2fbbd37fb907cfde03434684717c0a78b353e8c 100644
--- a/beat/core/test/prefix/algorithms/user/setup_error/1.py
+++ b/beat/core/test/prefix/algorithms/user/setup_error/1.py
@@ -1,35 +1,43 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
 
-class Algorithm:
 
+class Algorithm:
     def setup(self, parameters):
         return False
 
     def process(self, inputs, data_loaders, outputs):
-        outputs['out_data'].write(inputs['in_data'].data)
+        outputs["out_data"].write(inputs["in_data"].data)
         return True
diff --git a/beat/core/test/prefix/algorithms/user/shell_exec/1.py b/beat/core/test/prefix/algorithms/user/shell_exec/1.py
index 36e352c05f7144bc337a5321b25ef602a15cf25e..9d74298543825f903201528058804585b04ed06e 100644
--- a/beat/core/test/prefix/algorithms/user/shell_exec/1.py
+++ b/beat/core/test/prefix/algorithms/user/shell_exec/1.py
@@ -1,41 +1,50 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
+
 
 import os
 import numpy
 
-class Algorithm:
 
+class Algorithm:
     def setup(self, parameters):
-        self.cmd = parameters.get('command', 'true')
+        self.cmd = parameters.get("command", "true")
         self.status = None
 
     def process(self, inputs, output):
-        if self.status is None: #executes it only once
+        if self.status is None:  # executes it only once
             self.status = os.system(self.cmd)
-            output.write({'status': numpy.int32(self.status)})
+            output.write({"status": numpy.int32(self.status)})
         return True
diff --git a/beat/core/test/prefix/algorithms/user/sum/1.py b/beat/core/test/prefix/algorithms/user/sum/1.py
index 494190dd02b4ccc55f8036f8f2d09c3a35d13275..1a748829b7a3b25b3e706398b88533d92237dde9 100644
--- a/beat/core/test/prefix/algorithms/user/sum/1.py
+++ b/beat/core/test/prefix/algorithms/user/sum/1.py
@@ -1,34 +1,40 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
 
-class Algorithm:
 
+class Algorithm:
     def process(self, inputs, outputs):
-        outputs['sum'].write({
-            'value': inputs['a'].data.value + inputs['b'].data.value
-            })
+        outputs["sum"].write({"value": inputs["a"].data.value + inputs["b"].data.value})
         return True
diff --git a/beat/core/test/prefix/algorithms/user/sum_only_done_data_units/1.py b/beat/core/test/prefix/algorithms/user/sum_only_done_data_units/1.py
index be51298d013010b075ade287fae96e88153ffa1e..2fd0d3da39bacd7a17d6d84ee51029869acfb858 100644
--- a/beat/core/test/prefix/algorithms/user/sum_only_done_data_units/1.py
+++ b/beat/core/test/prefix/algorithms/user/sum_only_done_data_units/1.py
@@ -1,45 +1,51 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2017 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
+
 
 import numpy
 
 
 class Algorithm:
-
     def process(self, inputs, outputs):
         total = 0
 
-        if inputs['a'].isDataUnitDone():
-            total += inputs['a'].data.value
+        if inputs["a"].isDataUnitDone():
+            total += inputs["a"].data.value
 
-        if inputs['b'].isDataUnitDone():
-            total += inputs['b'].data.value
+        if inputs["b"].isDataUnitDone():
+            total += inputs["b"].data.value
 
-        outputs['sum'].write({
-            'value': numpy.int32(total)
-        })
+        outputs["sum"].write({"value": numpy.int32(total)})
         return True
diff --git a/beat/core/test/prefix/algorithms/user/sum_over_channels/1.py b/beat/core/test/prefix/algorithms/user/sum_over_channels/1.py
index 906a30724c2b738bdef206e290f29de7f02b0f93..592ab108af51063dbb8727627c1a0a8b52850963 100644
--- a/beat/core/test/prefix/algorithms/user/sum_over_channels/1.py
+++ b/beat/core/test/prefix/algorithms/user/sum_over_channels/1.py
@@ -1,39 +1,45 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2017 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
 
-class Algorithm:
 
+class Algorithm:
     def process(self, inputs, outputs):
         a = 0
-        if inputs['a'].hasMoreData():
-            inputs['a'].next()
-            a = inputs['a'].data.value
+        if inputs["a"].hasMoreData():
+            inputs["a"].next()
+            a = inputs["a"].data.value
 
-        outputs['sum'].write({
-            'value': a + inputs['b'].data.value
-            })
+        outputs["sum"].write({"value": a + inputs["b"].data.value})
         return True
diff --git a/beat/core/test/prefix/algorithms/user/sum_over_channels/2.py b/beat/core/test/prefix/algorithms/user/sum_over_channels/2.py
index adf8a83dd9065c4da25245659c41c5e0c997e4fb..99cbf0e2151044fc87c0ee89252718bb8049fae4 100644
--- a/beat/core/test/prefix/algorithms/user/sum_over_channels/2.py
+++ b/beat/core/test/prefix/algorithms/user/sum_over_channels/2.py
@@ -1,41 +1,47 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2017 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
 
-class Algorithm:
 
+class Algorithm:
     def process(self, inputs, outputs):
         a = 0
         b = 0
-        if inputs.groupOf('a').hasMoreData():
-            inputs.groupOf('a').next()
-            a = inputs['a'].data.value
-            b = inputs['b'].data.value
+        if inputs.groupOf("a").hasMoreData():
+            inputs.groupOf("a").next()
+            a = inputs["a"].data.value
+            b = inputs["b"].data.value
 
-        outputs['sum'].write({
-            'value': a + b + inputs['c'].data.value
-            })
+        outputs["sum"].write({"value": a + b + inputs["c"].data.value})
         return True
diff --git a/beat/core/test/prefix/algorithms/user/sum_over_channels/3.py b/beat/core/test/prefix/algorithms/user/sum_over_channels/3.py
index 094980ae7f63e075410e07614e638f1a509d2372..6758b3bce178d2b9ab96fc06e4bc5bc1be5601f0 100644
--- a/beat/core/test/prefix/algorithms/user/sum_over_channels/3.py
+++ b/beat/core/test/prefix/algorithms/user/sum_over_channels/3.py
@@ -1,41 +1,49 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2017 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
 
-class Algorithm:
 
+class Algorithm:
     def process(self, inputs, outputs):
         a = 0
         b = 0
-        if inputs.groupOf('a').hasMoreData():
-            inputs.groupOf('a').next()
-            a = inputs['a'].data.value
-            b = inputs['b'].data.value
+        if inputs.groupOf("a").hasMoreData():
+            inputs.groupOf("a").next()
+            a = inputs["a"].data.value
+            b = inputs["b"].data.value
 
-        outputs['sum'].write({
-            'value': a + b + inputs['c'].data.value + inputs['d'].data.value
-            })
+        outputs["sum"].write(
+            {"value": a + b + inputs["c"].data.value + inputs["d"].data.value}
+        )
         return True
diff --git a/beat/core/test/prefix/algorithms/user/synchronisation_analyzer/1.py b/beat/core/test/prefix/algorithms/user/synchronisation_analyzer/1.py
index d7e98b4c57b43eec592a165da3e3374e21614917..36292cdaa35ce66052eb27c3b8f2c02db640d38f 100644
--- a/beat/core/test/prefix/algorithms/user/synchronisation_analyzer/1.py
+++ b/beat/core/test/prefix/algorithms/user/synchronisation_analyzer/1.py
@@ -1,51 +1,58 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
+
 
 import numpy as np
 
 
 class Algorithm:
-
     def __init__(self):
         self.nb_data_units = 0
-        self.indices = ''
+        self.indices = ""
 
     def process(self, inputs, output):
         self.nb_data_units += 1
 
-        self.indices += '%d - %d\n' % (
-            inputs['input'].data_index,
-            inputs['input'].data_index_end
+        self.indices += "%d - %d\n" % (
+            inputs["input"].data_index,
+            inputs["input"].data_index_end,
         )
 
-        if not inputs['input'].hasMoreData():
-            output.write({
-                'nb_data_units': np.int32(self.nb_data_units),
-                'indices': self.indices
-            })
+        if not inputs["input"].hasMoreData():
+            output.write(
+                {"nb_data_units": np.int32(self.nb_data_units), "indices": self.indices}
+            )
 
         return True
diff --git a/beat/core/test/prefix/algorithms/user/syntax_error/1.py b/beat/core/test/prefix/algorithms/user/syntax_error/1.py
index a591aeeb8ae1bd11763b9943a35ecb0d6b7c810e..d8e3892a67f94fe967db8bf44a97e0077e3119c8 100644
--- a/beat/core/test/prefix/algorithms/user/syntax_error/1.py
+++ b/beat/core/test/prefix/algorithms/user/syntax_error/1.py
@@ -1,29 +1,38 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
+
 
 # The following line will produce a SyntaxError
 class Algorithm;
diff --git a/beat/core/test/prefix/algorithms/user/too_many_nexts/1.py b/beat/core/test/prefix/algorithms/user/too_many_nexts/1.py
index 7d8408b39237183576966c84078f9712a59ed06c..ba36f3627c5e06aa3d5e8e32f28187ebaaa8a3c2 100644
--- a/beat/core/test/prefix/algorithms/user/too_many_nexts/1.py
+++ b/beat/core/test/prefix/algorithms/user/too_many_nexts/1.py
@@ -1,41 +1,49 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
 
-class Algorithm:
 
+class Algorithm:
     def __init__(self):
 
         self.ignore = False
 
     def process(self, inputs, outputs):
         if not self.ignore:
-            while inputs['in_data2'].hasMoreData():
-                inputs['in_data2'].next()
-            inputs['in_data2'].next() #bogus
+            while inputs["in_data2"].hasMoreData():
+                inputs["in_data2"].next()
+            inputs["in_data2"].next()  # bogus
             self.ignore = True
-        outputs['out_data'].write(inputs['in_data'].data)
+        outputs["out_data"].write(inputs["in_data"].data)
         return True
diff --git a/beat/core/test/prefix/databases/empty_protocol_sets/1.py b/beat/core/test/prefix/databases/empty_protocol_sets/1.py
index b5f22f98e1f58ef05b50f6716ed26a630521e1de..a71ad19c5f34dbaa53fa8d17e0790263a33de33a 100644
--- a/beat/core/test/prefix/databases/empty_protocol_sets/1.py
+++ b/beat/core/test/prefix/databases/empty_protocol_sets/1.py
@@ -1,29 +1,38 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
+
 
 class View:
-  pass
+    pass
diff --git a/beat/core/test/prefix/databases/empty_protocols/1.py b/beat/core/test/prefix/databases/empty_protocols/1.py
index b5f22f98e1f58ef05b50f6716ed26a630521e1de..a71ad19c5f34dbaa53fa8d17e0790263a33de33a 100644
--- a/beat/core/test/prefix/databases/empty_protocols/1.py
+++ b/beat/core/test/prefix/databases/empty_protocols/1.py
@@ -1,29 +1,38 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
+
 
 class View:
-  pass
+    pass
diff --git a/beat/core/test/prefix/databases/empty_set_outputs/1.py b/beat/core/test/prefix/databases/empty_set_outputs/1.py
index b5f22f98e1f58ef05b50f6716ed26a630521e1de..a71ad19c5f34dbaa53fa8d17e0790263a33de33a 100644
--- a/beat/core/test/prefix/databases/empty_set_outputs/1.py
+++ b/beat/core/test/prefix/databases/empty_set_outputs/1.py
@@ -1,29 +1,38 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
+
 
 class View:
-  pass
+    pass
diff --git a/beat/core/test/prefix/databases/invalid/1.py b/beat/core/test/prefix/databases/invalid/1.py
index 6b16be0da66926be4ba0fe9a02f88baa5d7d307c..5251376661c58f2e25a1204be2d7c8cc4b4ffb16 100644
--- a/beat/core/test/prefix/databases/invalid/1.py
+++ b/beat/core/test/prefix/databases/invalid/1.py
@@ -1,29 +1,38 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
+
 
 class View; # <-- syntax error!
     def next(self): return True
diff --git a/beat/core/test/prefix/databases/large/1.py b/beat/core/test/prefix/databases/large/1.py
index deb54d674f7f5a87597779c111dcf9b9a1d5c9ad..6338efc94531e85bdc67069d0823fbd4a14c55f8 100644
--- a/beat/core/test/prefix/databases/large/1.py
+++ b/beat/core/test/prefix/databases/large/1.py
@@ -1,47 +1,54 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2017 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
+
 
 import numpy
 from collections import namedtuple
 from beat.backend.python.database import View
 
 
-#----------------------------------------------------------
+# ----------------------------------------------------------
 
 
 class LargeView(View):
-
     def __init__(self):
         super(LargeView, self).__init__()
         numpy.random.seed(0)  # So it is kept reproducible
 
-
     def index(self, root_folder, parameters):
-        Entry = namedtuple('Entry', ['out'])
+        Entry = namedtuple("Entry", ["out"])
 
         entries = []
         for i in range(0, 1000):
@@ -49,28 +56,23 @@ class LargeView(View):
 
         return entries
 
-
     def get(self, output, index):
         obj = self.objs[index]
 
-        if output == 'out':
-            return {
-                'value': obj.out
-            }
+        if output == "out":
+            return {"value": obj.out}
 
 
-#----------------------------------------------------------
+# ----------------------------------------------------------
 
 
 class SmallView(View):
-
     def __init__(self):
         super(SmallView, self).__init__()
         numpy.random.seed(0)  # So it is kept reproducible
 
-
     def index(self, root_folder, parameters):
-        Entry = namedtuple('Entry', ['out'])
+        Entry = namedtuple("Entry", ["out"])
 
         entries = []
         for i in range(0, 1000):
@@ -78,11 +80,8 @@ class SmallView(View):
 
         return entries
 
-
     def get(self, output, index):
         obj = self.objs[index]
 
-        if output == 'out':
-            return {
-                'value': obj.out
-            }
+        if output == "out":
+            return {"value": obj.out}
diff --git a/beat/core/test/prefix/databases/missing_protocol_name/1.py b/beat/core/test/prefix/databases/missing_protocol_name/1.py
index b5f22f98e1f58ef05b50f6716ed26a630521e1de..a71ad19c5f34dbaa53fa8d17e0790263a33de33a 100644
--- a/beat/core/test/prefix/databases/missing_protocol_name/1.py
+++ b/beat/core/test/prefix/databases/missing_protocol_name/1.py
@@ -1,29 +1,38 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
+
 
 class View:
-  pass
+    pass
diff --git a/beat/core/test/prefix/databases/missing_protocol_sets/1.py b/beat/core/test/prefix/databases/missing_protocol_sets/1.py
index b5f22f98e1f58ef05b50f6716ed26a630521e1de..a71ad19c5f34dbaa53fa8d17e0790263a33de33a 100644
--- a/beat/core/test/prefix/databases/missing_protocol_sets/1.py
+++ b/beat/core/test/prefix/databases/missing_protocol_sets/1.py
@@ -1,29 +1,38 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
+
 
 class View:
-  pass
+    pass
diff --git a/beat/core/test/prefix/databases/missing_protocols/1.py b/beat/core/test/prefix/databases/missing_protocols/1.py
index b5f22f98e1f58ef05b50f6716ed26a630521e1de..a71ad19c5f34dbaa53fa8d17e0790263a33de33a 100644
--- a/beat/core/test/prefix/databases/missing_protocols/1.py
+++ b/beat/core/test/prefix/databases/missing_protocols/1.py
@@ -1,29 +1,38 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
+
 
 class View:
-  pass
+    pass
diff --git a/beat/core/test/prefix/databases/missing_set_name/1.py b/beat/core/test/prefix/databases/missing_set_name/1.py
index b5f22f98e1f58ef05b50f6716ed26a630521e1de..a71ad19c5f34dbaa53fa8d17e0790263a33de33a 100644
--- a/beat/core/test/prefix/databases/missing_set_name/1.py
+++ b/beat/core/test/prefix/databases/missing_set_name/1.py
@@ -1,29 +1,38 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
+
 
 class View:
-  pass
+    pass
diff --git a/beat/core/test/prefix/databases/missing_set_outputs/1.py b/beat/core/test/prefix/databases/missing_set_outputs/1.py
index b5f22f98e1f58ef05b50f6716ed26a630521e1de..a71ad19c5f34dbaa53fa8d17e0790263a33de33a 100644
--- a/beat/core/test/prefix/databases/missing_set_outputs/1.py
+++ b/beat/core/test/prefix/databases/missing_set_outputs/1.py
@@ -1,29 +1,38 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
+
 
 class View:
-  pass
+    pass
diff --git a/beat/core/test/prefix/databases/missing_set_view/1.py b/beat/core/test/prefix/databases/missing_set_view/1.py
index b5f22f98e1f58ef05b50f6716ed26a630521e1de..a71ad19c5f34dbaa53fa8d17e0790263a33de33a 100644
--- a/beat/core/test/prefix/databases/missing_set_view/1.py
+++ b/beat/core/test/prefix/databases/missing_set_view/1.py
@@ -1,29 +1,38 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
+
 
 class View:
-  pass
+    pass
diff --git a/beat/core/test/prefix/databases/mixed_protocol_names/1.py b/beat/core/test/prefix/databases/mixed_protocol_names/1.py
index b5f22f98e1f58ef05b50f6716ed26a630521e1de..a71ad19c5f34dbaa53fa8d17e0790263a33de33a 100644
--- a/beat/core/test/prefix/databases/mixed_protocol_names/1.py
+++ b/beat/core/test/prefix/databases/mixed_protocol_names/1.py
@@ -1,29 +1,38 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
+
 
 class View:
-  pass
+    pass
diff --git a/beat/core/test/prefix/databases/mixed_set_names/1.py b/beat/core/test/prefix/databases/mixed_set_names/1.py
index b5f22f98e1f58ef05b50f6716ed26a630521e1de..a71ad19c5f34dbaa53fa8d17e0790263a33de33a 100644
--- a/beat/core/test/prefix/databases/mixed_set_names/1.py
+++ b/beat/core/test/prefix/databases/mixed_set_names/1.py
@@ -1,29 +1,38 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
+
 
 class View:
-  pass
+    pass
diff --git a/beat/core/test/prefix/databases/same_protocol_names/1.py b/beat/core/test/prefix/databases/same_protocol_names/1.py
index b5f22f98e1f58ef05b50f6716ed26a630521e1de..a71ad19c5f34dbaa53fa8d17e0790263a33de33a 100644
--- a/beat/core/test/prefix/databases/same_protocol_names/1.py
+++ b/beat/core/test/prefix/databases/same_protocol_names/1.py
@@ -1,29 +1,38 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
+
 
 class View:
-  pass
+    pass
diff --git a/beat/core/test/prefix/databases/same_set_names/1.py b/beat/core/test/prefix/databases/same_set_names/1.py
index b5f22f98e1f58ef05b50f6716ed26a630521e1de..a71ad19c5f34dbaa53fa8d17e0790263a33de33a 100644
--- a/beat/core/test/prefix/databases/same_set_names/1.py
+++ b/beat/core/test/prefix/databases/same_set_names/1.py
@@ -1,29 +1,38 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
+
 
 class View:
-  pass
+    pass
diff --git a/beat/core/test/prefix/databases/simple/1.py b/beat/core/test/prefix/databases/simple/1.py
index 4c68f5df7c354e5dbe6f09be97baf7ad538edea2..17736c9018f85f90175f589298efada95b22ff09 100644
--- a/beat/core/test/prefix/databases/simple/1.py
+++ b/beat/core/test/prefix/databases/simple/1.py
@@ -1,29 +1,38 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
+
 
 import numpy
 
@@ -32,67 +41,45 @@ from beat.backend.python.database import View as BaseView
 
 
 class View(BaseView):
-
     def index(self, root_folder, parameters):
-        Entry = namedtuple('Entry', ['out'])
-
-        return [
-            Entry(42),
-        ]
+        Entry = namedtuple("Entry", ["out"])
 
+        return [Entry(42)]
 
     def get(self, output, index):
         obj = self.objs[index]
 
-        if output == 'out':
-            return {
-                'value': numpy.int32(obj.out)
-            }
+        if output == "out":
+            return {"value": numpy.int32(obj.out)}
 
 
-#----------------------------------------------------------
+# ----------------------------------------------------------
 
 
 class View2(BaseView):
-
     def index(self, root_folder, parameters):
-        Entry = namedtuple('Entry', ['out'])
-
-        return [
-            Entry(53),
-        ]
+        Entry = namedtuple("Entry", ["out"])
 
+        return [Entry(53)]
 
     def get(self, output, index):
         obj = self.objs[index]
 
-        if output == 'out':
-            return {
-                'value': numpy.int32(obj.out)
-            }
+        if output == "out":
+            return {"value": numpy.int32(obj.out)}
 
 
-#----------------------------------------------------------
+# ----------------------------------------------------------
 
 
 class LargeView(BaseView):
-
     def index(self, root_folder, parameters):
-        Entry = namedtuple('Entry', ['out'])
-
-        return [
-            Entry(0),
-            Entry(1),
-            Entry(2),
-            Entry(3),
-            Entry(4),
-        ]
+        Entry = namedtuple("Entry", ["out"])
 
+        return [Entry(0), Entry(1), Entry(2), Entry(3), Entry(4)]
 
     def get(self, output, index):
         obj = self.objs[index]
 
-        if output == 'out':
-            return {
-                'value': numpy.int32(obj.out)
-            }
+        if output == "out":
+            return {"value": numpy.int32(obj.out)}
diff --git a/beat/core/test/prefix/databases/simple/1.rst b/beat/core/test/prefix/databases/simple/1.rst
index 905535e43bc4475c1a87690d3b0a817f255afb45..06cdb73b0206703ee2d142d00aa1b4df8e00d2d5 100644
--- a/beat/core/test/prefix/databases/simple/1.rst
+++ b/beat/core/test/prefix/databases/simple/1.rst
@@ -1,23 +1,33 @@
 
-.. Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           ..
-.. Contact: beat.support@idiap.ch                                              ..
-..                                                                             ..
-.. This file is part of the beat.core module of the BEAT platform.             ..
-..                                                                             ..
-.. Commercial License Usage                                                    ..
-.. Licensees holding valid commercial BEAT licenses may use this file in       ..
-.. accordance with the terms contained in a written agreement between you      ..
-.. and Idiap. For further information contact tto@idiap.ch                     ..
-..                                                                             ..
-.. Alternatively, this file may be used under the terms of the GNU Affero      ..
-.. Public License version 3 as published by the Free Software and appearing    ..
-.. in the file LICENSE.AGPL included in the packaging of this file.            ..
-.. The BEAT platform 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.                                        ..
-..                                                                             ..
-.. You should have received a copy of the GNU Affero Public License along      ..
-.. with the BEAT platform. If not, see http://www.gnu.org/licenses/.           ..
+.. Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/          ..
+.. Contact: beat.support@idiap.ch                                             ..
+..                                                                            ..
+.. This file is part of the beat.backend.python module of the BEAT platform.  ..
+..                                                                            ..
+.. Redistribution and use in source and binary forms, with or without
+.. modification, are permitted provided that the following conditions are met:
+
+.. 1. Redistributions of source code must retain the above copyright notice, this
+.. list of conditions and the following disclaimer.
+
+.. 2. Redistributions in binary form must reproduce the above copyright notice,
+.. this list of conditions and the following disclaimer in the documentation
+.. and/or other materials provided with the distribution.
+
+.. 3. Neither the name of the copyright holder nor the names of its contributors
+.. may be used to endorse or promote products derived from this software without
+.. specific prior written permission.
+
+.. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+.. ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+.. WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+.. DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+.. FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.. DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+.. SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+.. CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+.. OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+.. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 The Simple Digit Database
diff --git a/beat/core/test/prefix/libraries/user/dep/1.py b/beat/core/test/prefix/libraries/user/dep/1.py
index 4267ed623b47df93bc6b5e6d9d2014f2e0b6d9b8..f242f2d66365b1eeb24b190bc0c5add21d678af4 100644
--- a/beat/core/test/prefix/libraries/user/dep/1.py
+++ b/beat/core/test/prefix/libraries/user/dep/1.py
@@ -1,34 +1,45 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
+
 
 import sys
 
+
 def f():
-  return 'OK'
+    return "OK"
+
 
 def pyver():
-  return '%d.%d' % sys.version_info[:2]
+    return "%d.%d" % sys.version_info[:2]
diff --git a/beat/core/test/prefix/libraries/user/direct_recursion/1.py b/beat/core/test/prefix/libraries/user/direct_recursion/1.py
index 6568e7ffe58207dcef13e6706aaa764cc1c76dac..f806ae3612d4191db3420370a8dedf0a7aafdbd9 100644
--- a/beat/core/test/prefix/libraries/user/direct_recursion/1.py
+++ b/beat/core/test/prefix/libraries/user/direct_recursion/1.py
@@ -1,28 +1,37 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
+
 
 # nothing here
diff --git a/beat/core/test/prefix/libraries/user/for_dep/1.py b/beat/core/test/prefix/libraries/user/for_dep/1.py
index 4267ed623b47df93bc6b5e6d9d2014f2e0b6d9b8..f242f2d66365b1eeb24b190bc0c5add21d678af4 100644
--- a/beat/core/test/prefix/libraries/user/for_dep/1.py
+++ b/beat/core/test/prefix/libraries/user/for_dep/1.py
@@ -1,34 +1,45 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
+
 
 import sys
 
+
 def f():
-  return 'OK'
+    return "OK"
+
 
 def pyver():
-  return '%d.%d' % sys.version_info[:2]
+    return "%d.%d" % sys.version_info[:2]
diff --git a/beat/core/test/prefix/libraries/user/indirect_recursion/1.py b/beat/core/test/prefix/libraries/user/indirect_recursion/1.py
index 6568e7ffe58207dcef13e6706aaa764cc1c76dac..f806ae3612d4191db3420370a8dedf0a7aafdbd9 100644
--- a/beat/core/test/prefix/libraries/user/indirect_recursion/1.py
+++ b/beat/core/test/prefix/libraries/user/indirect_recursion/1.py
@@ -1,28 +1,37 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
+
 
 # nothing here
diff --git a/beat/core/test/prefix/libraries/user/indirect_recursion_next/1.py b/beat/core/test/prefix/libraries/user/indirect_recursion_next/1.py
index 6568e7ffe58207dcef13e6706aaa764cc1c76dac..f806ae3612d4191db3420370a8dedf0a7aafdbd9 100644
--- a/beat/core/test/prefix/libraries/user/indirect_recursion_next/1.py
+++ b/beat/core/test/prefix/libraries/user/indirect_recursion_next/1.py
@@ -1,28 +1,37 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
+
 
 # nothing here
diff --git a/beat/core/test/prefix/libraries/user/nest1/1.py b/beat/core/test/prefix/libraries/user/nest1/1.py
index 0500c1fae7c80749d966b27a773a04dc85f81232..7f4e43c3508fabd1f66b7741ef1e5d8ce5985193 100644
--- a/beat/core/test/prefix/libraries/user/nest1/1.py
+++ b/beat/core/test/prefix/libraries/user/nest1/1.py
@@ -1,32 +1,42 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
+
 
 def f(par):
-  return valid.f() + par
+    return valid.f() + par
+
 
 def pyver(par):
-  return valid.pyver() + par
+    return valid.pyver() + par
diff --git a/beat/core/test/prefix/libraries/user/nest2/1.py b/beat/core/test/prefix/libraries/user/nest2/1.py
index 52084b6e04e82a52967a25ca330b9bf823f432a3..1330e000f65411891f0f05a9fba1aebd1a279090 100644
--- a/beat/core/test/prefix/libraries/user/nest2/1.py
+++ b/beat/core/test/prefix/libraries/user/nest2/1.py
@@ -1,32 +1,42 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
+
 
 def f(par):
-  return nest1.f(par) + par
+    return nest1.f(par) + par
+
 
 def pyver(par):
-  return nest1.pyver(par) + par
+    return nest1.pyver(par) + par
diff --git a/beat/core/test/prefix/libraries/user/sum/1.py b/beat/core/test/prefix/libraries/user/sum/1.py
index 7e1e79f1bc95f30a76239d31304a328a6b75bf88..f4d8e317fb78340beba03315499c491c6576faea 100644
--- a/beat/core/test/prefix/libraries/user/sum/1.py
+++ b/beat/core/test/prefix/libraries/user/sum/1.py
@@ -1,29 +1,38 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
+
 
 def sum(a, b):
-  return a + b
+    return a + b
diff --git a/beat/core/test/prefix/libraries/user/valid/1.py b/beat/core/test/prefix/libraries/user/valid/1.py
index 4267ed623b47df93bc6b5e6d9d2014f2e0b6d9b8..f242f2d66365b1eeb24b190bc0c5add21d678af4 100644
--- a/beat/core/test/prefix/libraries/user/valid/1.py
+++ b/beat/core/test/prefix/libraries/user/valid/1.py
@@ -1,34 +1,45 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
+
 
 import sys
 
+
 def f():
-  return 'OK'
+    return "OK"
+
 
 def pyver():
-  return '%d.%d' % sys.version_info[:2]
+    return "%d.%d" % sys.version_info[:2]
diff --git a/beat/core/test/prefix/plotters/user/scatter/1.py b/beat/core/test/prefix/plotters/user/scatter/1.py
index 2f05c47431420084f3b623fc438e9458819c93f7..712ff5d9e73041b560b73d6ef89974a9407f500e 100644
--- a/beat/core/test/prefix/plotters/user/scatter/1.py
+++ b/beat/core/test/prefix/plotters/user/scatter/1.py
@@ -1,29 +1,38 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
+
 
 import six
 import numpy
@@ -31,27 +40,27 @@ import itertools
 
 # Make sure we won't require an X11 connection
 import matplotlib
-matplotlib.use('Agg')
+
+matplotlib.use("Agg")
 
 from matplotlib.figure import Figure
 import matplotlib.pyplot as pyplot
 
 
 class Plotter:
-
     def setup(self, parameters):
 
-        self.xlabel = parameters['xlabel']
-        self.xaxis_multiplier = parameters['xaxis_multiplier']
-        self.xaxis_log = parameters['xaxis_log']
-        self.ylabel = parameters['ylabel']
-        self.yaxis_multiplier = parameters['yaxis_multiplier']
-        self.yaxis_log = parameters['yaxis_log']
-        self.title  = parameters['title']
-        self.line_attributes = parameters['line_attributes'].split('&')
-        self.legend = parameters['legend'].split('&')
-        self.grid = parameters['grid']
-        self.mimetype = parameters['mimetype']
+        self.xlabel = parameters["xlabel"]
+        self.xaxis_multiplier = parameters["xaxis_multiplier"]
+        self.xaxis_log = parameters["xaxis_log"]
+        self.ylabel = parameters["ylabel"]
+        self.yaxis_multiplier = parameters["yaxis_multiplier"]
+        self.yaxis_log = parameters["yaxis_log"]
+        self.title = parameters["title"]
+        self.line_attributes = parameters["line_attributes"].split("&")
+        self.legend = parameters["legend"].split("&")
+        self.grid = parameters["grid"]
+        self.mimetype = parameters["mimetype"]
 
         return True
 
@@ -61,11 +70,11 @@ class Plotter:
         fig = Figure()
         ax = fig.add_subplot(111)
 
-        if not isinstance(inputs, (list,tuple)):
+        if not isinstance(inputs, (list, tuple)):
             inputs = [inputs]
-        if not isinstance(self.legend, (list,tuple)):
+        if not isinstance(self.legend, (list, tuple)):
             self.legend = [self.legend]
-        if not isinstance(self.line_attributes, (list,tuple)):
+        if not isinstance(self.line_attributes, (list, tuple)):
             self.line_attributes = [self.line_attributes]
 
         try:
@@ -75,19 +84,23 @@ class Plotter:
 
         C = itertools.cycle
 
-        for input, attributes, label  in Z(inputs, C(self.line_attributes), C(self.legend)):
+        for input, attributes, label in Z(
+            inputs, C(self.line_attributes), C(self.legend)
+        ):
 
             # Massages the input data
             final_data = numpy.array([(k.x, k.y) for k in input.data])
-            x = final_data[:,0]
-            y = final_data[:,1]
+            x = final_data[:, 0]
+            y = final_data[:, 1]
             x *= self.xaxis_multiplier
             y *= self.yaxis_multiplier
 
             args = (x, y)
-            if attributes: args = args + (attributes,)
+            if attributes:
+                args = args + (attributes,)
             kwargs = {}
-            if label: kwargs['label'] = label
+            if label:
+                kwargs["label"] = label
 
             # Plots
             ax.plot(*args, **kwargs)
@@ -97,9 +110,12 @@ class Plotter:
         ax.set_ylabel(self.ylabel)
         ax.set_title(self.title)
         ax.grid(self.grid)
-        if self.xaxis_log: ax.set_xscale('log')
-        if self.yaxis_log: ax.set_yscale('log')
-        if any(self.legend): ax.legend()
+        if self.xaxis_log:
+            ax.set_xscale("log")
+        if self.yaxis_log:
+            ax.set_yscale("log")
+        if any(self.legend):
+            ax.legend()
 
         # Returns the image
         if six.PY2:
@@ -107,12 +123,13 @@ class Plotter:
         else:
             sio = six.BytesIO()
 
-        if self.mimetype == 'image/png':
-            pyplot.savefig(sio, format='png')
-        elif self.mimetype == 'image/jpeg':
-            pyplot.savefig(sio, format='jpeg')
-        elif self.mimetype == 'application/pdf':
+        if self.mimetype == "image/png":
+            pyplot.savefig(sio, format="png")
+        elif self.mimetype == "image/jpeg":
+            pyplot.savefig(sio, format="jpeg")
+        elif self.mimetype == "application/pdf":
             from matplotlib.backends.backend_pdf import FigureCanvasPdf
+
             canvas = FigureCanvasPdf(fig)
             canvas.print_figure(sio)
 
diff --git a/beat/core/test/test_algorithm_dependencies.py b/beat/core/test/test_algorithm_dependencies.py
index adec61fa5f5265d5e4e4a08b2187ddf418d58019..f02995beb7b28ff5d9de316313723681d0bff995 100644
--- a/beat/core/test/test_algorithm_dependencies.py
+++ b/beat/core/test/test_algorithm_dependencies.py
@@ -1,29 +1,37 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
 
 
 import nose.tools
@@ -35,6 +43,7 @@ from ..dataformat import DataFormat, Storage as DataFormatStorage
 from . import prefix, tmp_prefix
 from .utils import cleanup
 
+
 def copy_objects(algo, lib):
 
     a = Algorithm(prefix, algo)
@@ -52,45 +61,45 @@ def copy_objects(algo, lib):
 
 @nose.tools.with_setup(teardown=cleanup)
 def test_dependencies():
-    name = 'user/for_dep/1'
-    dep_name = 'user/dep/1'
+    name = "user/for_dep/1"
+    dep_name = "user/dep/1"
 
     copy_objects(name, dep_name)
 
     a = Algorithm(tmp_prefix, name)
-    assert a.valid, '\n  * %s' % '\n  * '.join(a.errors)
+    assert a.valid, "\n  * %s" % "\n  * ".join(a.errors)
     nose.tools.eq_(len(a.uses), 0)
     nose.tools.eq_(len(a.libraries), 0)
 
     l_dep = Library(tmp_prefix, dep_name)
-    assert l_dep.valid, '\n  * %s' % '\n  * '.join(l_dep.errors)
+    assert l_dep.valid, "\n  * %s" % "\n  * ".join(l_dep.errors)
 
     # check modification
-    a.uses['dep1'] = dep_name
+    a.uses["dep1"] = dep_name
     a.write()
     a = Algorithm(tmp_prefix, name)
-    assert a.valid, '\n  * %s' % '\n  * '.join(a.errors)
+    assert a.valid, "\n  * %s" % "\n  * ".join(a.errors)
 
     nose.tools.eq_(len(a.uses), 1)
     nose.tools.eq_(len(a.libraries), 1)
-    nose.tools.eq_(list(a.uses.keys())[0], 'dep1')
-    nose.tools.eq_(list(a.uses.values())[0], 'user/dep/1')
+    nose.tools.eq_(list(a.uses.keys())[0], "dep1")
+    nose.tools.eq_(list(a.uses.values())[0], "user/dep/1")
 
     a.uses = {}
-    a.uses['mod1'] = dep_name
+    a.uses["mod1"] = dep_name
     a.write()
     a = Algorithm(tmp_prefix, name)
-    assert a.valid, '\n  * %s' % '\n  * '.join(a.errors)
+    assert a.valid, "\n  * %s" % "\n  * ".join(a.errors)
 
     nose.tools.eq_(len(a.uses), 1)
     nose.tools.eq_(len(a.libraries), 1)
-    nose.tools.eq_(list(a.uses.keys())[0], 'mod1')
-    nose.tools.eq_(list(a.uses.values())[0], 'user/dep/1')
+    nose.tools.eq_(list(a.uses.keys())[0], "mod1")
+    nose.tools.eq_(list(a.uses.values())[0], "user/dep/1")
 
     a.uses = {}
     a.write()
     a = Algorithm(tmp_prefix, name)
-    assert a.valid, '\n  * %s' % '\n  * '.join(a.errors)
+    assert a.valid, "\n  * %s" % "\n  * ".join(a.errors)
 
     nose.tools.eq_(len(a.uses), 0)
     nose.tools.eq_(len(a.libraries), 0)
@@ -99,21 +108,21 @@ def test_dependencies():
 @nose.tools.with_setup(teardown=cleanup)
 def test_invalid_dependencies():
 
-    name = 'user/for_dep/1'
-    dep_name = 'user/invalid_dep/1'
+    name = "user/for_dep/1"
+    dep_name = "user/invalid_dep/1"
 
     copy_objects(name, dep_name)
 
     a = Algorithm(tmp_prefix, name)
-    assert a.valid, '\n  * %s' % '\n  * '.join(a.errors)
+    assert a.valid, "\n  * %s" % "\n  * ".join(a.errors)
     nose.tools.eq_(len(a.uses), 0)
     nose.tools.eq_(len(a.libraries), 0)
 
-    l_dep = Library(tmp_prefix, 'user/invalid_dep/1')
-    assert l_dep.valid, '\n  * %s' % '\n  * '.join(l_dep.errors)
+    l_dep = Library(tmp_prefix, "user/invalid_dep/1")
+    assert l_dep.valid, "\n  * %s" % "\n  * ".join(l_dep.errors)
 
-    a.uses['dep'] = dep_name
+    a.uses["dep"] = dep_name
     a.write()
     a = Algorithm(tmp_prefix, name)
     assert not a.valid
-    assert a.errors[0].find('differs from current language') != -1
+    assert a.errors[0].find("differs from current language") != -1
diff --git a/beat/core/test/test_algorithm_loading.py b/beat/core/test/test_algorithm_loading.py
index 4b969a332c7dc7834fd184f9cde09a064eca7d3d..2a4bf92982154d716702ee91f5590a9bf92c39e2 100644
--- a/beat/core/test/test_algorithm_loading.py
+++ b/beat/core/test/test_algorithm_loading.py
@@ -1,29 +1,37 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
 
 
 import six
@@ -35,93 +43,92 @@ from . import prefix, tmp_prefix
 from .utils import cleanup
 
 
-#----------------------------------------------------------
+# ----------------------------------------------------------
 
 
 def test_load_default_algorithm():
 
     algorithm = Algorithm(prefix, data=None)
-    assert algorithm.valid, '\n  * %s' % '\n  * '.join(algorithm.errors)
+    assert algorithm.valid, "\n  * %s" % "\n  * ".join(algorithm.errors)
 
 
-#----------------------------------------------------------
+# ----------------------------------------------------------
 
 
 def test_missing_inputs():
 
-    algorithm = Algorithm(prefix, 'user/no_inputs_declarations/1')
+    algorithm = Algorithm(prefix, "user/no_inputs_declarations/1")
     assert algorithm.valid is False
     assert algorithm.errors[0].find("'inputs' is a required property") != -1
 
 
-#----------------------------------------------------------
+# ----------------------------------------------------------
 
 
 def test_missing_outputs():
 
-    algorithm = Algorithm(prefix, 'user/no_outputs_declarations/1')
+    algorithm = Algorithm(prefix, "user/no_outputs_declarations/1")
     assert algorithm.valid is False
     assert algorithm.errors[0].find("'outputs' is a required property") != -1
 
 
-#----------------------------------------------------------
+# ----------------------------------------------------------
 
 
 def test_invalid_loop_channel():
 
-    algorithm = Algorithm(prefix, 'schema/invalid_loop_channel/1')
+    algorithm = Algorithm(prefix, "schema/invalid_loop_channel/1")
     assert algorithm.valid is False
     assert algorithm.errors[0].find("'request' is a required property") != -1
 
 
-#----------------------------------------------------------
+# ----------------------------------------------------------
 
 
 def test_v2():
 
-    algorithm = Algorithm(prefix, 'user/integers_add_v2/1')
-    assert algorithm.valid, '\n  * %s' % '\n  * '.join(algorithm.errors)
+    algorithm = Algorithm(prefix, "user/integers_add_v2/1")
+    assert algorithm.valid, "\n  * %s" % "\n  * ".join(algorithm.errors)
 
 
 def test_analyzer_v2():
 
-    algorithm = Algorithm(prefix, 'user/integers_echo_analyzer_v2/1')
-    assert algorithm.valid, '\n  * %s' % '\n  * '.join(algorithm.errors)
+    algorithm = Algorithm(prefix, "user/integers_echo_analyzer_v2/1")
+    assert algorithm.valid, "\n  * %s" % "\n  * ".join(algorithm.errors)
 
 
 def test_v3():
 
-    algorithm = Algorithm(prefix, 'autonomous/loop/1')
-    assert algorithm.valid, '\n  * %s' % '\n  * '.join(algorithm.errors)
+    algorithm = Algorithm(prefix, "autonomous/loop/1")
+    assert algorithm.valid, "\n  * %s" % "\n  * ".join(algorithm.errors)
 
-
-    algorithm = Algorithm(prefix, 'autonomous/loop_user/1')
-    assert algorithm.valid, '\n  * %s' % '\n  * '.join(algorithm.errors)
+    algorithm = Algorithm(prefix, "autonomous/loop_user/1")
+    assert algorithm.valid, "\n  * %s" % "\n  * ".join(algorithm.errors)
 
 
 def test_invalid_v3():
-    algorithm = Algorithm(prefix, 'schema/invalid_loop_output/1')
+    algorithm = Algorithm(prefix, "schema/invalid_loop_output/1")
     assert not algorithm.valid
 
-    algorithm = Algorithm(prefix, 'schema/invalid_loop_type/1')
+    algorithm = Algorithm(prefix, "schema/invalid_loop_type/1")
     assert not algorithm.valid
 
-    algorithm = Algorithm(prefix, 'schema/invalid_loop_user_type/1')
+    algorithm = Algorithm(prefix, "schema/invalid_loop_user_type/1")
     assert not algorithm.valid
 
 
-#----------------------------------------------------------
+# ----------------------------------------------------------
 
 
 @nose.tools.with_setup(teardown=cleanup)
 def test_export():
 
-    name = 'user/for_dep/1'
+    name = "user/for_dep/1"
     obj = Algorithm(prefix, name)
-    assert obj.valid, '\n  * %s' % '\n  * '.join(obj.errors)
+    assert obj.valid, "\n  * %s" % "\n  * ".join(obj.errors)
 
     obj.export(tmp_prefix)
 
     # load from tmp_prefix and validates
     exported = Algorithm(tmp_prefix, name)
-    assert exported.valid, '\n  * %s' % '\n  * '.join(exported.errors)
+    assert exported.valid, "\n  * %s" % "\n  * ".join(exported.errors)
diff --git a/beat/core/test/test_bcp.py b/beat/core/test/test_bcp.py
index fed084e12bf0bf712a48eeb495a9d7ce77c62f1b..3d27ef07189274f16cd7e1a9415c03a9c590c0a5 100644
--- a/beat/core/test/test_bcp.py
+++ b/beat/core/test/test_bcp.py
@@ -1,29 +1,37 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
 
 
 # Tests for experiment execution
diff --git a/beat/core/test/test_database.py b/beat/core/test/test_database.py
index afa38edb8af803c15518422f3cc38664552e486a..594610289f1192f7fdf81fa4291a15b2bb31155c 100644
--- a/beat/core/test/test_database.py
+++ b/beat/core/test/test_database.py
@@ -1,29 +1,37 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2017 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
 
 
 import nose.tools
@@ -36,12 +44,12 @@ from .utils import cleanup
 @nose.tools.with_setup(teardown=cleanup)
 def test_export():
 
-    name = 'integers_db/1'
+    name = "integers_db/1"
     obj = Database(prefix, name)
-    assert obj.valid, '\n  * %s' % '\n  * '.join(obj.errors)
+    assert obj.valid, "\n  * %s" % "\n  * ".join(obj.errors)
 
     obj.export(tmp_prefix)
 
     # load from tmp_prefix and validates
     exported = Database(tmp_prefix, name)
-    assert exported.valid, '\n  * %s' % '\n  * '.join(exported.errors)
+    assert exported.valid, "\n  * %s" % "\n  * ".join(exported.errors)
diff --git a/beat/core/test/test_docker.py b/beat/core/test/test_docker.py
index 23c538376ef5da628f0afa83ddbca3a6e0ad2968..21f1de0022129b772e0087199fa96e70a9a92e58 100644
--- a/beat/core/test/test_docker.py
+++ b/beat/core/test/test_docker.py
@@ -1,33 +1,40 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
-
-
-"""Asynchronous process I/O with the Subprocess module
-"""
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
+
+
+"""Asynchronous process I/O with the Subprocess module"""
 
 import os
 import sys
@@ -50,6 +57,7 @@ from .utils import skipif
 from . import network_name
 from . import DOCKER_NETWORK_TEST_ENABLED
 
+
 class NoDiscoveryTests(unittest.TestCase):
     """Test cases that don't require the discovery of database and runtime
     environments.
@@ -59,24 +67,21 @@ class NoDiscoveryTests(unittest.TestCase):
     def setUpClass(cls):
         cls.host = Host(raise_on_errors=False, discover=False)
 
-
     @classmethod
     def tearDownClass(cls):
         cls.host.teardown()
 
-
     def tearDown(self):
         self.host.teardown()
-        assert not self.host.containers # All containers are gone
+        assert not self.host.containers  # All containers are gone
 
 
 class NetworkTest(NoDiscoveryTests):
-
     @slow
     @skipif(not DOCKER_NETWORK_TEST_ENABLED, "Network test disabled")
     def test_network(self):
         string = "hello world"
-        container = self.host.create_container('debian:8.4', ["echo", string])
+        container = self.host.create_container("debian:8.4", ["echo", string])
         container.network_name = network_name
 
         try:
@@ -87,60 +92,60 @@ class NetworkTest(NoDiscoveryTests):
             raise
 
         self.assertEqual(status, 0)
-        self.assertEqual(self.host.logs(container), string + '\n')
-
+        self.assertEqual(self.host.logs(container), string + "\n")
 
     @slow
     @skipif(not DOCKER_NETWORK_TEST_ENABLED, "Network test disabled")
     def test_non_existing_network(self):
 
         string = "hello world"
-        network_name = 'beat.core.fake'
-        container = self.host.create_container('debian:8.4', ["echo", string])
+        network_name = "beat.core.fake"
+        container = self.host.create_container("debian:8.4", ["echo", string])
         container.network_name = network_name
 
         try:
             self.host.start(container)
         except RuntimeError as e:
-            self.assertTrue(str(e).find('network %s not found' % network_name) >= 0)
+            self.assertTrue(str(e).find("network %s not found" % network_name) >= 0)
 
 
 class UserTest(NoDiscoveryTests):
-
     @slow
     def test_user(self):
         """Test that the uid property is correctly used.
         """
 
-        container = self.host.create_container('debian:8.4', ["id"])
+        container = self.host.create_container("debian:8.4", ["id"])
         container.uid = 10000
 
         self.host.start(container)
         status = self.host.wait(container)
 
         self.assertEqual(status, 0)
-        self.assertTrue(self.host.logs(container).startswith('uid={0} gid={0}'.format(container.uid)))
+        self.assertTrue(
+            self.host.logs(container).startswith(
+                "uid={0} gid={0}".format(container.uid)
+            )
+        )
 
 
 class EnvironmentVariableTest(NoDiscoveryTests):
-
     @slow
     def test_environment_variable(self):
         """Test that the uid property is correctly used.
         """
 
-        container = self.host.create_container('debian:8.4', ["env"])
-        container.add_environment_variable('DOCKER_TEST', 'good')
+        container = self.host.create_container("debian:8.4", ["env"])
+        container.add_environment_variable("DOCKER_TEST", "good")
 
         self.host.start(container)
         status = self.host.wait(container)
 
         self.assertEqual(status, 0)
-        self.assertTrue('DOCKER_TEST=good' in self.host.logs(container))
+        self.assertTrue("DOCKER_TEST=good" in self.host.logs(container))
 
 
 class WorkdirTest(NoDiscoveryTests):
-
     @slow
     def test_workdir(self):
         """Test that the workdir property is correctly used.
@@ -148,9 +153,11 @@ class WorkdirTest(NoDiscoveryTests):
 
         with TemporaryDirectory() as tmp_folder:
             test_file = "test.txt"
-            container = self.host.create_container('debian:8.4', ["cp", "/etc/debian_version", test_file])
-            container.add_volume(tmp_folder, '/test_workdir', read_only=False)
-            container.set_workdir('/test_workdir')
+            container = self.host.create_container(
+                "debian:8.4", ["cp", "/etc/debian_version", test_file]
+            )
+            container.add_volume(tmp_folder, "/test_workdir", read_only=False)
+            container.set_workdir("/test_workdir")
 
             self.host.start(container)
             status = self.host.wait(container)
@@ -165,14 +172,13 @@ class WorkdirTest(NoDiscoveryTests):
 
 
 class EntrypointTest(NoDiscoveryTests):
-
     @slow
     def test_entrypoint(self):
         """Test that the entrypoint property is correctly used.
         """
 
-        container = self.host.create_container('debian:8.4', ["42"])
-        container.set_entrypoint('echo')
+        container = self.host.create_container("debian:8.4", ["42"])
+        container.set_entrypoint("echo")
 
         self.host.start(container)
         status = self.host.wait(container)
@@ -185,38 +191,36 @@ class EntrypointTest(NoDiscoveryTests):
 
 
 class AsyncTest(NoDiscoveryTests):
-
     @slow
     def test_echo(self):
 
         string = "hello, world"
 
-        container = self.host.create_container('debian:8.4', ["echo", string])
+        container = self.host.create_container("debian:8.4", ["echo", string])
         self.host.start(container)
         status = self.host.wait(container)
 
         self.assertEqual(status, 0)
-        self.assertEqual(self.host.logs(container), string + '\n')
+        self.assertEqual(self.host.logs(container), string + "\n")
 
     @slow
     def test_non_existing(self):
 
-        container = self.host.create_container('debian:8.4', ["sdfsdfdsf329909092"])
+        container = self.host.create_container("debian:8.4", ["sdfsdfdsf329909092"])
 
         try:
             self.host.start(container)
         except Exception as e:
-            self.assertTrue(str(e).find('Failed to create the container') >= 0)
-
-        self.assertFalse(self.host.containers) # All containers are gone
+            self.assertTrue(str(e).find("Failed to create the container") >= 0)
 
+        self.assertFalse(self.host.containers)  # All containers are gone
 
     @slow
     def test_timeout(self):
 
-        sleep_for = 100 # seconds
+        sleep_for = 100  # seconds
 
-        container = self.host.create_container('debian:8.4', ["sleep", str(sleep_for)])
+        container = self.host.create_container("debian:8.4", ["sleep", str(sleep_for)])
         self.host.start(container)
 
         retval = self.host.wait(container, timeout=0.5)
@@ -226,53 +230,54 @@ class AsyncTest(NoDiscoveryTests):
 
         retval = self.host.wait(container)
 
-        self.assertEqual(self.host.status(container), 'exited')
+        self.assertEqual(self.host.status(container), "exited")
         self.assertEqual(retval, 137)
-        self.assertEqual(self.host.logs(container), '')
-
+        self.assertEqual(self.host.logs(container), "")
 
     @slow
     def test_does_not_timeout(self):
 
-        sleep_for = 0.5 # seconds
+        sleep_for = 0.5  # seconds
 
-        container = self.host.create_container('debian:8.4', ["sleep", str(sleep_for)])
+        container = self.host.create_container("debian:8.4", ["sleep", str(sleep_for)])
         self.host.start(container)
 
-        status = self.host.wait(container, timeout=5) # Should not timeout
+        status = self.host.wait(container, timeout=5)  # Should not timeout
 
-        self.assertEqual(self.host.status(container), 'exited')
+        self.assertEqual(self.host.status(container), "exited")
         self.assertEqual(status, 0)
-        self.assertEqual(self.host.logs(container), '')
-
+        self.assertEqual(self.host.logs(container), "")
 
 
 class AsyncWithEnvironmentTest(unittest.TestCase):
     @classmethod
     def setUpClass(cls):
         cls.host = Host(raise_on_errors=False)
-        cls.test_environment = cls.host.full_environment_name('Python 2.7')
-
+        cls.test_environment = cls.host.full_environment_name("Python 2.7")
 
     @classmethod
     def tearDownClass(cls):
         cls.host.teardown()
 
-
     def tearDown(self):
         self.host.teardown()
-        assert not self.host.containers # All containers are gone
+        assert not self.host.containers  # All containers are gone
 
     @slow
     def test_memory_limit(self):
 
-        cmd = ['python', '-c', '; '.join([
-            "print('Before')",
-            "import sys; sys.stdout.flush()",
-            "d = '0' * (40 * 1024 * 1024)",
-            "import time; time.sleep(5)",
-            "print('After')",
-          ])
+        cmd = [
+            "python",
+            "-c",
+            "; ".join(
+                [
+                    "print('Before')",
+                    "import sys; sys.stdout.flush()",
+                    "d = '0' * (40 * 1024 * 1024)",
+                    "import time; time.sleep(5)",
+                    "print('After')",
+                ]
+            ),
         ]
 
         container = self.host.create_container(self.test_environment, cmd)
@@ -290,21 +295,25 @@ class AsyncWithEnvironmentTest(unittest.TestCase):
 
         status = self.host.wait(container)
 
-        self.assertEqual(self.host.status(container), 'exited')
+        self.assertEqual(self.host.status(container), "exited")
         self.assertEqual(status, 137)
-        self.assertEqual(self.host.logs(container).strip(), 'Before')
-
+        self.assertEqual(self.host.logs(container).strip(), "Before")
 
     @slow
     def test_memory_limit2(self):
 
-        cmd = ['python', '-c', '; '.join([
-            "print('Before')",
-            "import sys; sys.stdout.flush()",
-            "d = '0' * (10 * 1024 * 1024)",
-            "import time; time.sleep(5)",
-            "print('After')",
-          ])
+        cmd = [
+            "python",
+            "-c",
+            "; ".join(
+                [
+                    "print('Before')",
+                    "import sys; sys.stdout.flush()",
+                    "d = '0' * (10 * 1024 * 1024)",
+                    "import time; time.sleep(5)",
+                    "print('After')",
+                ]
+            ),
         ]
 
         container = self.host.create_container(self.test_environment, cmd)
@@ -316,26 +325,28 @@ class AsyncWithEnvironmentTest(unittest.TestCase):
 
         status = self.host.wait(container)
 
-        assert stats['memory']['percent'] > 10, 'Memory check failed, ' \
-            '%d%% <= 10%%' % stats['memory']['percent']
+        assert stats["memory"]["percent"] > 10, (
+            "Memory check failed, " "%d%% <= 10%%" % stats["memory"]["percent"]
+        )
 
-        assert stats['memory']['percent'] < 20, 'Memory check failed, ' \
-            '%d%% >= 15%%' % stats['memory']['percent']
+        assert stats["memory"]["percent"] < 20, (
+            "Memory check failed, " "%d%% >= 15%%" % stats["memory"]["percent"]
+        )
 
-        self.assertEqual(self.host.status(container), 'exited')
+        self.assertEqual(self.host.status(container), "exited")
         self.assertEqual(status, 0)
-        self.assertEqual(self.host.logs(container).strip(), 'Before\nAfter')
-
+        self.assertEqual(self.host.logs(container).strip(), "Before\nAfter")
 
     def _run_cpulimit(self, processes, max_cpu_percent, sleep_time):
 
-        program = pkg_resources.resource_filename(__name__, 'cpu_stress.py')
-        dst_name = os.path.join('/tmp', os.path.basename(program))
+        program = pkg_resources.resource_filename(__name__, "cpu_stress.py")
+        dst_name = os.path.join("/tmp", os.path.basename(program))
 
-        container = self.host.create_container(self.test_environment,
-                                               ['python', dst_name, str(processes)])
+        container = self.host.create_container(
+            self.test_environment, ["python", dst_name, str(processes)]
+        )
 
-        container.add_volume(program, os.path.join('/tmp', 'cpu_stress.py'))
+        container.add_volume(program, os.path.join("/tmp", "cpu_stress.py"))
 
         self.host.start(container, max_cpu_percent=max_cpu_percent)
 
@@ -343,36 +354,33 @@ class AsyncWithEnvironmentTest(unittest.TestCase):
 
         stats = self.host.statistics(container)
 
-        self.assertEqual(self.host.status(container), 'running')
+        self.assertEqual(self.host.status(container), "running")
 
-        percent = stats['cpu']['percent']
-        assert percent < (1.1 * max_cpu_percent), \
-               "%.2f%% is more than 20%% off the expected ceiling at %d%%!" % (percent, max_cpu_percent)
+        percent = stats["cpu"]["percent"]
+        assert percent < (1.1 * max_cpu_percent), (
+            "%.2f%% is more than 20%% off the expected ceiling at %d%%!"
+            % (percent, max_cpu_percent)
+        )
 
         # make sure nothing is there anymore
         self.host.kill(container)
         self.assertEqual(self.host.wait(container), 137)
 
-
     @slow
     def test_cpulimit_at_20percent(self):
         # runs 1 process that should consume at most 20% of the host CPU
         self._run_cpulimit(1, 20, 3)
 
-
     @slow
     def test_cpulimit_at_100percent(self):
         # runs 4 processes that should consume 50% of the host CPU
         self._run_cpulimit(4, 100, 3)
 
 
-
 class HostTest(unittest.TestCase):
-
     def setUp(self):
         Host.images_cache = {}
 
-
     @slow
     def test_images_cache(self):
         self.assertEqual(len(Host.images_cache), 0)
@@ -402,7 +410,6 @@ class HostTest(unittest.TestCase):
 
         self.assertTrue(stop - start < 1.0)
 
-
     @slow
     def test_images_cache_file(self):
         self.assertEqual(len(Host.images_cache), 0)
@@ -410,8 +417,10 @@ class HostTest(unittest.TestCase):
         # Might take some time
         start = time.time()
 
-        host = Host(images_cache=os.path.join(tmp_prefix, 'images_cache.json'),
-                    raise_on_errors=False)
+        host = Host(
+            images_cache=os.path.join(tmp_prefix, "images_cache.json"),
+            raise_on_errors=False,
+        )
         host.teardown()
 
         stop = time.time()
@@ -426,8 +435,10 @@ class HostTest(unittest.TestCase):
         # Should be instantaneous
         start = time.time()
 
-        host = Host(images_cache=os.path.join(tmp_prefix, 'images_cache.json'),
-                    raise_on_errors=False)
+        host = Host(
+            images_cache=os.path.join(tmp_prefix, "images_cache.json"),
+            raise_on_errors=False,
+        )
         host.teardown()
 
         stop = time.time()
diff --git a/beat/core/test/test_docker_databases_provider.py b/beat/core/test/test_docker_databases_provider.py
index 152edfd849e1a7d65d8790c866a7f2083b1b354e..384cdb34fdca407672e2b3df149d5877ecd2c246 100644
--- a/beat/core/test/test_docker_databases_provider.py
+++ b/beat/core/test/test_docker_databases_provider.py
@@ -1,29 +1,37 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2017 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.backend.python module of the BEAT platform.   #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
 
 
 # Tests for experiment execution
@@ -32,6 +40,7 @@ import os
 import sys
 
 import logging
+
 logger = logging.getLogger(__name__)
 
 import unittest
@@ -55,56 +64,51 @@ from . import prefix
 from . import tmp_prefix
 
 
-#----------------------------------------------------------
+# ----------------------------------------------------------
 
 
 CONFIGURATION = {
-    'queue': 'queue',
-    'inputs': {
-        'in_data': {
-            'set': 'double',
-            'protocol': 'double',
-            'database': 'integers_db/1',
-            'output': 'a',
-            'path': 'ec/89/e5/6e161d2cb012ef6ac8acf59bf453a6328766f90dc9baba9eb14ea23c55',
-            'endpoint': 'a',
-            'hash': 'ec89e56e161d2cb012ef6ac8acf59bf453a6328766f90dc9baba9eb14ea23c55',
-            'channel': 'integers'
+    "queue": "queue",
+    "inputs": {
+        "in_data": {
+            "set": "double",
+            "protocol": "double",
+            "database": "integers_db/1",
+            "output": "a",
+            "path": "ec/89/e5/6e161d2cb012ef6ac8acf59bf453a6328766f90dc9baba9eb14ea23c55",
+            "endpoint": "a",
+            "hash": "ec89e56e161d2cb012ef6ac8acf59bf453a6328766f90dc9baba9eb14ea23c55",
+            "channel": "integers",
         }
     },
-    'algorithm': 'user/integers_echo/1',
-    'parameters': {},
-    'environment': {
-        'name': 'Python 2.7',
-        'version': '1.2.0'
-    },
-    'outputs': {
-        'out_data': {
-            'path': '20/61/b6/2df3c3bedd5366f4a625c5d87ffbf5a26007c46c456e9abf21b46c6681',
-            'endpoint': 'out_data',
-            'hash': '2061b62df3c3bedd5366f4a625c5d87ffbf5a26007c46c456e9abf21b46c6681',
-            'channel': 'integers'
+    "algorithm": "user/integers_echo/1",
+    "parameters": {},
+    "environment": {"name": "Python 2.7", "version": "1.2.0"},
+    "outputs": {
+        "out_data": {
+            "path": "20/61/b6/2df3c3bedd5366f4a625c5d87ffbf5a26007c46c456e9abf21b46c6681",
+            "endpoint": "out_data",
+            "hash": "2061b62df3c3bedd5366f4a625c5d87ffbf5a26007c46c456e9abf21b46c6681",
+            "channel": "integers",
         }
     },
-    'nb_slots': 1,
-    'channel': 'integers'
+    "nb_slots": 1,
+    "channel": "integers",
 }
 
 
-#----------------------------------------------------------
+# ----------------------------------------------------------
 
 
 class TestDatabasesProvider(unittest.TestCase):
-
     @classmethod
     def setUpClass(cls):
         cls.host = Host(raise_on_errors=False)
 
-
     def setUp(self):
-        if sys.platform == 'darwin':
-            self.working_dir = tempfile.mkdtemp(prefix=__name__, dir='/tmp')
-            self.cache_root = tempfile.mkdtemp(prefix=__name__, dir='/tmp')
+        if sys.platform == "darwin":
+            self.working_dir = tempfile.mkdtemp(prefix=__name__, dir="/tmp")
+            self.cache_root = tempfile.mkdtemp(prefix=__name__, dir="/tmp")
         else:
             self.working_dir = tempfile.mkdtemp(prefix=__name__)
             self.cache_root = tempfile.mkdtemp(prefix=__name__)
@@ -114,7 +118,6 @@ class TestDatabasesProvider(unittest.TestCase):
         self.client_socket = None
         self.databases_container = None
 
-
     def tearDown(self):
         self.stop_databases_provider()
 
@@ -132,40 +135,43 @@ class TestDatabasesProvider(unittest.TestCase):
 
         self.host.teardown()
 
-
     def start_databases_provider(self, configuration):
-        with open(os.path.join(self.working_dir, 'configuration.json'), 'wb') as f:
+        with open(os.path.join(self.working_dir, "configuration.json"), "wb") as f:
             data = simplejson.dumps(configuration, indent=4)
-            f.write(data.encode('utf-8'))
+            f.write(data.encode("utf-8"))
 
-        working_prefix = os.path.join(self.working_dir, 'prefix')
+        working_prefix = os.path.join(self.working_dir, "prefix")
         if not os.path.exists(working_prefix):
             os.makedirs(working_prefix)
 
-        input_name, input_cfg = list(configuration['inputs'].items())[0]
+        input_name, input_cfg = list(configuration["inputs"].items())[0]
 
-        database = Database(prefix, input_cfg['database'])
+        database = Database(prefix, input_cfg["database"])
         database.export(working_prefix)
 
-        view = database.view(input_cfg['protocol'], input_cfg['set'])
-        view.index(os.path.join(self.cache_root, input_cfg['path']))
+        view = database.view(input_cfg["protocol"], input_cfg["set"])
+        view.index(os.path.join(self.cache_root, input_cfg["path"]))
 
         port = find_free_port()
         cmd = [
-            'databases_provider',
-            '--debug',
-            '0.0.0.0:%i' % port,
-            '/beat/prefix',
-            '/beat/cache',
+            "databases_provider",
+            "--debug",
+            "0.0.0.0:%i" % port,
+            "/beat/prefix",
+            "/beat/cache",
         ]
 
-        databases_environment = self.host.db2docker([ input_cfg['database'] ])
+        databases_environment = self.host.db2docker([input_cfg["database"]])
 
-        self.databases_container = self.host.create_container(databases_environment, cmd)
+        self.databases_container = self.host.create_container(
+            databases_environment, cmd
+        )
 
-        self.databases_container.add_volume(self.working_dir, '/beat/prefix')
-        self.databases_container.add_volume('/tmp', os.path.join('/beat/datasets', input_cfg['database']))
-        self.databases_container.add_volume(self.cache_root, '/beat/cache')
+        self.databases_container.add_volume(self.working_dir, "/beat/prefix")
+        self.databases_container.add_volume(
+            "/tmp", os.path.join("/beat/datasets", input_cfg["database"])
+        )
+        self.databases_container.add_volume(self.cache_root, "/beat/cache")
 
         self.databases_container.add_port(port, port, host_address=self.host.ip)
 
@@ -173,21 +179,21 @@ class TestDatabasesProvider(unittest.TestCase):
 
         self.client_context = zmq.Context()
         self.client_socket = self.client_context.socket(zmq.PAIR)
-        self.client_socket.connect('tcp://{}:{}'.format(self.host.ip, port))
+        self.client_socket.connect("tcp://{}:{}".format(self.host.ip, port))
 
-        dataformat_name = database.set(input_cfg['protocol'], input_cfg['set'])['outputs'][input_cfg['output']]
+        dataformat_name = database.set(input_cfg["protocol"], input_cfg["set"])[
+            "outputs"
+        ][input_cfg["output"]]
 
         self.data_source = RemoteDataSource()
         self.data_source.setup(self.client_socket, input_name, dataformat_name, prefix)
 
-
     def stop_databases_provider(self):
         if self.databases_container is not None:
             self.host.kill(self.databases_container)
             self.host.wait(self.databases_container)
             self.databases_container = None
 
-
     def test_success(self):
         self.start_databases_provider(CONFIGURATION)
 
diff --git a/beat/core/test/test_docker_environments.py b/beat/core/test/test_docker_environments.py
index 6d121d993f0c9dc8e1461f8a1b6befd8851da6bf..6f994d9c06b99abe4d74fbb0bd38a2fe7e997758 100644
--- a/beat/core/test/test_docker_environments.py
+++ b/beat/core/test/test_docker_environments.py
@@ -1,29 +1,38 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2018 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
+
 
 import unittest
 
@@ -35,11 +44,11 @@ from .utils import slow
 
 
 class EnvironmentTest(unittest.TestCase):
-
     def setUp(self):
         self.host = Host(raise_on_errors=False)
-        self.test_environment = \
-            self.host.full_environment_name('Cxx development environment')
+        self.test_environment = self.host.full_environment_name(
+            "Cxx development environment"
+        )
 
     def tearDown(self):
         self.host.teardown()
@@ -47,11 +56,11 @@ class EnvironmentTest(unittest.TestCase):
 
     @slow
     def test_package_enumeration(self):
-        package_list = environments.enumerate_packages(self.host,
-                                                       self.test_environment)
+        package_list = environments.enumerate_packages(self.host, self.test_environment)
 
         self.assertTrue(len(package_list) > 0)
 
         for package in package_list:
-            self.assertListEqual(sorted(list(package.keys())),
-                                 sorted(['version', 'name']))
+            self.assertListEqual(
+                sorted(list(package.keys())), sorted(["version", "name"])
+            )
diff --git a/beat/core/test/test_docker_execution.py b/beat/core/test/test_docker_execution.py
index 79fc9265efa792a788b45b14a02590c291053f31..0e0db9db969e275889996797d0dd1691f433a364 100644
--- a/beat/core/test/test_docker_execution.py
+++ b/beat/core/test/test_docker_execution.py
@@ -1,29 +1,37 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
 
 
 # Tests for experiment execution within Docker containers
@@ -45,43 +53,55 @@ from . import prefix_folder
 from . import DOCKER_NETWORK_TEST_ENABLED
 
 from .utils import DOCKER_TEST_IMAGES
+
 BUILDER_CONTAINER_NAME = "docker.idiap.ch/beat/beat.env.client"
-BUILDER_IMAGE = BUILDER_CONTAINER_NAME + ':' + DOCKER_TEST_IMAGES[BUILDER_CONTAINER_NAME]
+BUILDER_IMAGE = (
+    BUILDER_CONTAINER_NAME + ":" + DOCKER_TEST_IMAGES[BUILDER_CONTAINER_NAME]
+)
 
-#----------------------------------------------------------
+# ----------------------------------------------------------
 
 
 class TestDockerExecution(BaseExecutionMixIn):
-
     @classmethod
     def setup_class(cls):
         cls.host = Host(raise_on_errors=False)
 
-
     @classmethod
     def teardown_class(cls):
         cls.host.teardown()
         cleanup()
 
-
     def teardown(self):
         self.host.teardown()
 
-
-    def create_executor(self, prefix, configuration, tmp_prefix, dataformat_cache,
-                        database_cache, algorithm_cache):
-        executor = DockerExecutor(self.host, prefix, configuration, tmp_prefix,
-                                  dataformat_cache, database_cache, algorithm_cache)
+    def create_executor(
+        self,
+        prefix,
+        configuration,
+        tmp_prefix,
+        dataformat_cache,
+        database_cache,
+        algorithm_cache,
+    ):
+        executor = DockerExecutor(
+            self.host,
+            prefix,
+            configuration,
+            tmp_prefix,
+            dataformat_cache,
+            database_cache,
+            algorithm_cache,
+        )
 
         executor.debug = os.environ.get("DOCKER_TEST_DEBUG", False) == "True"
         return executor
 
-
     def build_algorithm(self, algorithm):
         test_folder = os.path.abspath(os.path.join(os.path.dirname(__file__)))
-        scripts_folder = os.path.abspath(os.path.join(test_folder, 'scripts'))
+        scripts_folder = os.path.abspath(os.path.join(test_folder, "scripts"))
         sources_folder = os.path.abspath(os.path.join(test_folder, algorithm))
-        cmd = ['/build.sh']
+        cmd = ["/build.sh"]
         builder_container = self.host.create_container(BUILDER_IMAGE, cmd)
         builder_container.add_volume("%s/build.sh" % scripts_folder, "/build.sh")
         builder_container.add_volume(sources_folder, "/sources", read_only=False)
@@ -98,42 +118,51 @@ class TestDockerExecution(BaseExecutionMixIn):
         assert status == 0
 
         # Update the tmp prefix with the latest content
-        subprocess.check_call(['rsync',
-                               '-arz',
-                               '--exclude="*"',
-                               '--include="*.so"',
-                               os.path.join(test_folder, 'prefix'),
-                               prefix_folder])
-
+        subprocess.check_call(
+            [
+                "rsync",
+                "-arz",
+                '--exclude="*"',
+                '--include="*.so"',
+                os.path.join(test_folder, "prefix"),
+                prefix_folder,
+            ]
+        )
 
     @slow
     @skipif(not DOCKER_NETWORK_TEST_ENABLED, "Network test disabled")
     def test_custom_network(self):
-        result = self.execute('user/user/integers_addition/1/integers_addition',
-                [{'sum': 495, 'nb': 9}], network_name=network_name)
+        result = self.execute(
+            "user/user/integers_addition/1/integers_addition",
+            [{"sum": 495, "nb": 9}],
+            network_name=network_name,
+        )
 
         assert result is None
 
     @slow
     def test_custom_port_range(self):
-        result = self.execute('user/user/integers_addition/1/integers_addition',
-                [{'sum': 495, 'nb': 9}], port_range="50000:50100")
+        result = self.execute(
+            "user/user/integers_addition/1/integers_addition",
+            [{"sum": 495, "nb": 9}],
+            port_range="50000:50100",
+        )
 
         assert result is None
 
     @slow
     def test_single_1_prepare_error(self):
-        result = self.execute('user/user/single/1/prepare_error', [None])
+        result = self.execute("user/user/single/1/prepare_error", [None])
 
-        assert result['status'] == 1
-        assert result['user_error'] == "'Could not prepare algorithm (returned False)'"
+        assert result["status"] == 1
+        assert result["user_error"] == "'Could not prepare algorithm (returned False)'"
 
     @slow
     def test_single_1_setup_error(self):
-        result = self.execute('user/user/single/1/setup_error', [None])
+        result = self.execute("user/user/single/1/setup_error", [None])
 
-        assert result['status'] == 1
-        assert result['user_error'] == "'Could not setup algorithm (returned False)'"
+        assert result["status"] == 1
+        assert result["user_error"] == "'Could not setup algorithm (returned False)'"
 
     # NOT COMPATIBLE YET WITH THE NEW API
     # @slow
@@ -145,7 +174,11 @@ class TestDockerExecution(BaseExecutionMixIn):
         datasets_uid = os.getuid()
         self.build_algorithm("prefix/algorithms/user/cxx_integers_echo_legacy")
 
-        result = self.execute('user/user/double/1/cxx_double_legacy', [{'out_data': 42}], datasets_uid=datasets_uid)
+        result = self.execute(
+            "user/user/double/1/cxx_double_legacy",
+            [{"out_data": 42}],
+            datasets_uid=datasets_uid,
+        )
         assert result is None
 
     @slow
@@ -153,28 +186,45 @@ class TestDockerExecution(BaseExecutionMixIn):
         datasets_uid = os.getuid()
         self.build_algorithm("prefix/algorithms/user/cxx_integers_echo_sequential")
 
-        assert self.execute('user/user/double/1/cxx_double_sequential', [{'out_data': 42}], datasets_uid=datasets_uid) is None
+        assert (
+            self.execute(
+                "user/user/double/1/cxx_double_sequential",
+                [{"out_data": 42}],
+                datasets_uid=datasets_uid,
+            )
+            is None
+        )
 
     @slow
     def test_cxx_double_autonomous(self):
         datasets_uid = os.getuid()
         self.build_algorithm("prefix/algorithms/user/cxx_integers_echo_autonomous")
 
-        assert self.execute('user/user/double/1/cxx_double_autonomous', [{'out_data': 42}], datasets_uid=datasets_uid) is None
+        assert (
+            self.execute(
+                "user/user/double/1/cxx_double_autonomous",
+                [{"out_data": 42}],
+                datasets_uid=datasets_uid,
+            )
+            is None
+        )
 
     @slow
     def test_cxx_analyzer_error(self):
         datasets_uid = os.getuid()
         needed_alorithms = [
             "cxx_integers_echo_sequential",
-            "cxx_integers_echo_analyzer"
+            "cxx_integers_echo_analyzer",
         ]
 
         for algorithm in needed_alorithms:
             self.build_algorithm("prefix/algorithms/user/%s" % algorithm)
 
+        result = self.execute(
+            "user/user/double/1/cxx_analyzer_error",
+            [{"out_data": 42}],
+            datasets_uid=datasets_uid,
+        )
 
-        result = self.execute('user/user/double/1/cxx_analyzer_error', [{'out_data': 42}], datasets_uid=datasets_uid)
-
-        assert result['status'] == 255
-        assert "[sys] C++ algorithm can't be analyzers" in result['stderr']
+        assert result["status"] == 255
+        assert "[sys] C++ algorithm can't be analyzers" in result["stderr"]
diff --git a/beat/core/test/test_docker_worker.py b/beat/core/test/test_docker_worker.py
index da0f86e9a47999a24a4b1ec659af4c4a05c4539a..159307083681bcd149037a4665f999610e243c02 100644
--- a/beat/core/test/test_docker_worker.py
+++ b/beat/core/test/test_docker_worker.py
@@ -1,29 +1,37 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2017 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
 
 
 # Tests for experiment execution
@@ -33,31 +41,27 @@ from ..dock import Host
 from .test_worker import TestOneWorker, TestTwoWorkers
 
 
-#----------------------------------------------------------
+# ----------------------------------------------------------
 
 
 class TestOneWorkerDocker(TestOneWorker):
-
-    def __init__(self, methodName='runTest'):
+    def __init__(self, methodName="runTest"):
         super(TestOneWorkerDocker, self).__init__(methodName)
         self.docker = True
 
-
     @classmethod
     def setUpClass(cls):
         cls.host = Host(raise_on_errors=False)
 
 
-#----------------------------------------------------------
+# ----------------------------------------------------------
 
 
 class TestTwoWorkersDocker(TestTwoWorkers):
-
-    def __init__(self, methodName='runTest'):
+    def __init__(self, methodName="runTest"):
         super(TestTwoWorkersDocker, self).__init__(methodName)
         self.docker = True
 
-
     @classmethod
     def setUpClass(cls):
         cls.host = Host(raise_on_errors=False)
diff --git a/beat/core/test/test_execution.py b/beat/core/test/test_execution.py
index d9804f0ef4ac7dce25382da7e509d04243a6e168..6ebf89c2b43c7a5107049c1acfae17d18fa57273 100644
--- a/beat/core/test/test_execution.py
+++ b/beat/core/test/test_execution.py
@@ -1,29 +1,37 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
 
 
 # Tests for experiment execution
@@ -31,6 +39,7 @@
 import os
 import glob
 import logging
+
 logger = logging.getLogger(__name__)
 
 import numpy
@@ -51,44 +60,45 @@ from .utils import slow
 import nose.tools
 
 
-#----------------------------------------------------------
+# ----------------------------------------------------------
 
-class BaseExecutionMixIn(object):
 
+class BaseExecutionMixIn(object):
     def check_output(self, prefix, path):
-        '''Checks if a given output exists, together with its indexes and checksums
-        '''
+        """Checks if a given output exists, together with its indexes and checksums
+        """
 
         finalpath = os.path.join(prefix, path)
-        datafiles = glob.glob(finalpath + '*.data')
-        datachksums = glob.glob(finalpath + '*.data.checksum')
-        indexfiles = glob.glob(finalpath + '*.index')
-        indexchksums = glob.glob(finalpath + '*.index.checksum')
+        datafiles = glob.glob(finalpath + "*.data")
+        datachksums = glob.glob(finalpath + "*.data.checksum")
+        indexfiles = glob.glob(finalpath + "*.index")
+        indexchksums = glob.glob(finalpath + "*.index.checksum")
 
         assert datafiles
         nose.tools.eq_(len(datafiles), len(indexfiles))
         for k in datafiles + indexfiles:
-            checksum_file = k + '.checksum'
+            checksum_file = k + ".checksum"
             assert checksum_file in datachksums + indexchksums
             stored_checksum = None
-            with open(checksum_file, 'rt') as f: stored_checksum = f.read().strip()
+            with open(checksum_file, "rt") as f:
+                stored_checksum = f.read().strip()
             current_checksum = hashFileContents(k)
             nose.tools.eq_(current_checksum, stored_checksum)
 
-
     def load_result(self, executor):
-        '''Loads the result of an experiment, in a single go'''
+        """Loads the result of an experiment, in a single go"""
 
         f = CachedDataSource()
-        assert f.setup(os.path.join(executor.cache, executor.data['result']['path'] + '.data'),
-                       executor.prefix)
+        assert f.setup(
+            os.path.join(executor.cache, executor.data["result"]["path"] + ".data"),
+            executor.prefix,
+        )
         data, start, end = f[0]
         nose.tools.eq_(start, 0)
         assert end >= start
         f.close()
         return data
 
-
     def execute(self, label, expected_result, **kwargs):
         """Executes the full experiment, block after block, returning results. If an
         error occurs, returns information about the err'd block. Otherwise, returns
@@ -102,14 +112,18 @@ class BaseExecutionMixIn(object):
         database_cache = {}
         algorithm_cache = {}
 
-        experiment = Experiment(prefix, label, dataformat_cache, database_cache,
-                                algorithm_cache)
+        experiment = Experiment(
+            prefix, label, dataformat_cache, database_cache, algorithm_cache
+        )
 
-        assert experiment.valid, '\n  * %s' % '\n  * '.join(experiment.errors)
+        assert experiment.valid, "\n  * %s" % "\n  * ".join(experiment.errors)
 
         for block_name, infos in experiment.datasets.items():
-            view = infos['database'].view(infos['protocol'], infos['set'])
-            filename = toPath(hashDataset(infos['database'].name, infos['protocol'], infos['set']), suffix='.db')
+            view = infos["database"].view(infos["protocol"], infos["set"])
+            filename = toPath(
+                hashDataset(infos["database"].name, infos["protocol"], infos["set"]),
+                suffix=".db",
+            )
             view.index(os.path.join(tmp_prefix, filename))
 
         scheduled = experiment.setup()
@@ -117,170 +131,221 @@ class BaseExecutionMixIn(object):
         # can we execute it?
         results = []
         for key, value in scheduled.items():
-            configuration = {**value['configuration'], **kwargs}
-
-            executor = self.create_executor(prefix, configuration, tmp_prefix,
-                                            dataformat_cache, database_cache, algorithm_cache)
-            assert executor.valid, '\n  * %s' % '\n  * '.join(executor.errors)
+            configuration = {**value["configuration"], **kwargs}
+
+            executor = self.create_executor(
+                prefix,
+                configuration,
+                tmp_prefix,
+                dataformat_cache,
+                database_cache,
+                algorithm_cache,
+            )
+            assert executor.valid, "\n  * %s" % "\n  * ".join(executor.errors)
 
             with executor:
                 result = executor.process(timeout_in_minutes=3)
                 assert result
-                assert 'status' in result
-                assert 'stdout' in result
-                assert 'stderr' in result
-                assert 'timed_out' in result
-                assert 'system_error' in result
-                assert 'user_error' in result
-                if result['status'] != 0:
-                    logger.warn("status: %i", result['status'])
-                    logger.warn("(eventual) system errors: %s", result['system_error'])
-                    logger.warn("(eventual) user errors: %s", result['user_error'])
-                    logger.warn("stdout: %s", result['stdout'])
-                    logger.warn("stderr: %s", result['stderr'])
+                assert "status" in result
+                assert "stdout" in result
+                assert "stderr" in result
+                assert "timed_out" in result
+                assert "system_error" in result
+                assert "user_error" in result
+                if result["status"] != 0:
+                    logger.warn("status: %i", result["status"])
+                    logger.warn("(eventual) system errors: %s", result["system_error"])
+                    logger.warn("(eventual) user errors: %s", result["user_error"])
+                    logger.warn("stdout: %s", result["stdout"])
+                    logger.warn("stderr: %s", result["stderr"])
                     return result
-                if result['system_error']:
-                    logger.warn("system errors: %s", result['system_error'])
+                if result["system_error"]:
+                    logger.warn("system errors: %s", result["system_error"])
                     return result
-                assert result['status'] == 0
+                assert result["status"] == 0
 
-                if 'statistics' in result:
-                    assert isinstance(result['statistics'], dict)
+                if "statistics" in result:
+                    assert isinstance(result["statistics"], dict)
 
             if executor.analysis:
-                self.check_output(tmp_prefix, executor.data['result']['path'])
+                self.check_output(tmp_prefix, executor.data["result"]["path"])
                 results.append(self.load_result(executor))
             else:
-                for name, details in executor.data['outputs'].items():
-                    self.check_output(tmp_prefix, details['path'])
+                for name, details in executor.data["outputs"].items():
+                    self.check_output(tmp_prefix, details["path"])
 
         # compares all results
         assert results
 
         for k, result in enumerate(results):
             expected = result.__class__()
-            expected.from_dict(expected_result[k], casting='unsafe') #defaults=False
-
-            assert result.isclose(expected), "%r is not close enough to %r" % (result.as_dict(), expected.as_dict())
+            expected.from_dict(expected_result[k], casting="unsafe")  # defaults=False
 
+            assert result.isclose(expected), "%r is not close enough to %r" % (
+                result.as_dict(),
+                expected.as_dict(),
+            )
 
     @slow
     def test_integers_addition_1(self):
-        assert self.execute('user/user/integers_addition/1/integers_addition',
-                [{'sum': 495, 'nb': 9}]) is None
+        assert (
+            self.execute(
+                "user/user/integers_addition/1/integers_addition",
+                [{"sum": 495, "nb": 9}],
+            )
+            is None
+        )
 
     @slow
     def test_integers_addition_2(self):
-        assert self.execute('user/user/integers_addition/2/integers_addition',
-                [{'sum': 4995, 'nb': 9}]) is None
+        assert (
+            self.execute(
+                "user/user/integers_addition/2/integers_addition",
+                [{"sum": 4995, "nb": 9}],
+            )
+            is None
+        )
 
     @slow
     def test_single_1_single(self):
-        assert self.execute('user/user/single/1/single', [{'out_data': 42}]) is None
+        assert self.execute("user/user/single/1/single", [{"out_data": 42}]) is None
 
     @slow
     def test_single_1_add(self):
-        assert self.execute('user/user/single/1/single_add', [{'out_data': 43}]) is None
+        assert self.execute("user/user/single/1/single_add", [{"out_data": 43}]) is None
 
     @slow
     def test_single_1_add2(self):
-        assert self.execute('user/user/single/1/single_add2', [{'out_data': 44}]) is None
+        assert (
+            self.execute("user/user/single/1/single_add2", [{"out_data": 44}]) is None
+        )
 
     @slow
     def test_single_1_error(self):
-        result = self.execute('user/user/single/1/single_error', [None])
+        result = self.execute("user/user/single/1/single_error", [None])
         assert result
-        nose.tools.eq_(result['status'], 1)
-        assert result['user_error']
-        assert 'NameError' in result['user_error']
-        nose.tools.eq_(result['system_error'], '')
+        nose.tools.eq_(result["status"], 1)
+        assert result["user_error"]
+        assert "NameError" in result["user_error"]
+        nose.tools.eq_(result["system_error"], "")
 
     @slow
     def test_single_1_crash(self):
-        result = self.execute('user/user/single/1/single_crash', [None])
+        result = self.execute("user/user/single/1/single_crash", [None])
         assert result
-        nose.tools.eq_(result['status'], 1)
-        assert result['user_error']
-        assert 'NameError' in result['user_error']
-        nose.tools.eq_(result['system_error'], '')
+        nose.tools.eq_(result["status"], 1)
+        assert result["user_error"]
+        assert "NameError" in result["user_error"]
+        nose.tools.eq_(result["system_error"], "")
 
     @slow
     def test_single_1_db_crash(self):
-        result = self.execute('user/user/single/1/single_db_crash', [None])
+        result = self.execute("user/user/single/1/single_db_crash", [None])
         assert result
-        assert result['status'] != 0
-        assert result['user_error']
-        assert 'a = b' in result['user_error']
-        nose.tools.eq_(result['system_error'], '')
+        assert result["status"] != 0
+        assert result["user_error"]
+        assert "a = b" in result["user_error"]
+        nose.tools.eq_(result["system_error"], "")
 
     @slow
     def test_single_1_large(self):
-        assert self.execute('user/user/single/1/single_large', [{'out_data': 2.0}]) is None
+        assert (
+            self.execute("user/user/single/1/single_large", [{"out_data": 2.0}]) is None
+        )
 
     @slow
     def test_double_1(self):
-        assert self.execute('user/user/double/1/double', [{'out_data': 42}]) is None
+        assert self.execute("user/user/double/1/double", [{"out_data": 42}]) is None
 
     @slow
     def test_triangle_1(self):
-        assert self.execute('user/user/triangle/1/triangle', [{'out_data': 42}]) is None
+        assert self.execute("user/user/triangle/1/triangle", [{"out_data": 42}]) is None
 
     @slow
     def test_too_many_nexts(self):
-        result = self.execute('user/user/triangle/1/too_many_nexts', [None])
+        result = self.execute("user/user/triangle/1/too_many_nexts", [None])
         assert result
-        assert result['status'] != 0
-        assert result['user_error']
-        assert 'no more data' in result['user_error']
+        assert result["status"] != 0
+        assert result["user_error"]
+        assert "no more data" in result["user_error"]
 
     @slow
     def test_double_triangle_1(self):
-        assert self.execute('user/user/double_triangle/1/double_triangle', [{'out_data': 42}]) is None
+        assert (
+            self.execute(
+                "user/user/double_triangle/1/double_triangle", [{"out_data": 42}]
+            )
+            is None
+        )
 
     @slow
     def test_inputs_mix_1(self):
-        assert self.execute('user/user/inputs_mix/1/test', [{'sum': 495, 'nb': 9}]) is None
+        assert (
+            self.execute("user/user/inputs_mix/1/test", [{"sum": 495, "nb": 9}]) is None
+        )
 
     @slow
     def test_inputs_mix_2(self):
-        assert self.execute('user/user/inputs_mix/2/test', [{'sum': 495, 'nb': 9}]) is None
+        assert (
+            self.execute("user/user/inputs_mix/2/test", [{"sum": 495, "nb": 9}]) is None
+        )
 
     @slow
     def test_inputs_mix_3(self):
-        assert self.execute('user/user/inputs_mix/3/test', [{'sum': 945, 'nb': 9}]) is None
+        assert (
+            self.execute("user/user/inputs_mix/3/test", [{"sum": 945, "nb": 9}]) is None
+        )
 
     @slow
     def test_inputs_mix_3b(self):
-        assert self.execute('user/user/inputs_mix/3/test2', [{'sum': 954, 'nb': 9}]) is None
+        assert (
+            self.execute("user/user/inputs_mix/3/test2", [{"sum": 954, "nb": 9}])
+            is None
+        )
 
     @slow
     def test_inputs_mix_4(self):
-        assert self.execute('user/user/inputs_mix/4/test', [{'sum': 990, 'nb': 9}]) is None
+        assert (
+            self.execute("user/user/inputs_mix/4/test", [{"sum": 990, "nb": 9}]) is None
+        )
 
     @slow
     def test_inputs_mix_4b(self):
-        assert self.execute('user/user/inputs_mix/4/test2', [{'sum': 1008, 'nb': 9}]) is None
+        assert (
+            self.execute("user/user/inputs_mix/4/test2", [{"sum": 1008, "nb": 9}])
+            is None
+        )
 
     @slow
     def test_integers_labelled_1(self):
-        assert self.execute('user/user/integers_labelled/1/test', [
-            {
-                'nb_data_units': 3,
-                'indices': '0 - 4\n5 - 9\n10 - 14\n'
-            }
-        ]) is None
+        assert (
+            self.execute(
+                "user/user/integers_labelled/1/test",
+                [{"nb_data_units": 3, "indices": "0 - 4\n5 - 9\n10 - 14\n"}],
+            )
+            is None
+        )
 
     @slow
     def test_preprocessing_1(self):
-        assert self.execute('user/user/preprocessing/1/different_frequencies', [{'sum': 363, 'nb': 8}]) is None
+        assert (
+            self.execute(
+                "user/user/preprocessing/1/different_frequencies",
+                [{"sum": 363, "nb": 8}],
+            )
+            is None
+        )
 
     @slow
     def test_single_1_prepare_success(self):
-        assert self.execute('user/user/single/1/prepare_success', [{'out_data': 42}]) is None
+        assert (
+            self.execute("user/user/single/1/prepare_success", [{"out_data": 42}])
+            is None
+        )
 
     @slow
     def test_loop_1(self):
-        assert self.execute('user/user/loop/1/loop', [{'sum': 504, 'nb': 9}]) is None
+        assert self.execute("user/user/loop/1/loop", [{"sum": 504, "nb": 9}]) is None
 
     # For benchmark purposes
     # @slow
@@ -299,51 +364,75 @@ class BaseExecutionMixIn(object):
     #     print(time.time() - start)
 
 
-#----------------------------------------------------------
+# ----------------------------------------------------------
 
 
 class TestLocalExecution(BaseExecutionMixIn):
-
-    def create_executor(self, prefix, configuration, tmp_prefix, dataformat_cache,
-                        database_cache, algorithm_cache):
-        return LocalExecutor(prefix, configuration, tmp_prefix,
-                             dataformat_cache, database_cache, algorithm_cache)
+    def create_executor(
+        self,
+        prefix,
+        configuration,
+        tmp_prefix,
+        dataformat_cache,
+        database_cache,
+        algorithm_cache,
+    ):
+        return LocalExecutor(
+            prefix,
+            configuration,
+            tmp_prefix,
+            dataformat_cache,
+            database_cache,
+            algorithm_cache,
+        )
 
     @slow
     def test_single_1_prepare_error(self):
         with nose.tools.assert_raises(RuntimeError) as context:
-            result = self.execute('user/user/single/1/prepare_error', [None])
+            result = self.execute("user/user/single/1/prepare_error", [None])
 
-            assert 'Algorithm prepare failed' in context.exception
+            assert "Algorithm prepare failed" in context.exception
 
     @slow
     def test_single_1_setup_error(self):
         with nose.tools.assert_raises(RuntimeError) as context:
-            result = self.execute('user/user/single/1/setup_error', [None])
+            result = self.execute("user/user/single/1/setup_error", [None])
 
-            assert 'Algorithm setup failed' in context.exception
+            assert "Algorithm setup failed" in context.exception
 
 
-#----------------------------------------------------------
+# ----------------------------------------------------------
 
 
 class TestSubprocessExecution(BaseExecutionMixIn):
-
-    def create_executor(self, prefix, configuration, tmp_prefix, dataformat_cache,
-                        database_cache, algorithm_cache):
-        return SubprocessExecutor(prefix, configuration, tmp_prefix,
-                                  dataformat_cache, database_cache, algorithm_cache)
+    def create_executor(
+        self,
+        prefix,
+        configuration,
+        tmp_prefix,
+        dataformat_cache,
+        database_cache,
+        algorithm_cache,
+    ):
+        return SubprocessExecutor(
+            prefix,
+            configuration,
+            tmp_prefix,
+            dataformat_cache,
+            database_cache,
+            algorithm_cache,
+        )
 
     @slow
     def test_single_1_prepare_error(self):
-        result = self.execute('user/user/single/1/prepare_error', [None])
+        result = self.execute("user/user/single/1/prepare_error", [None])
 
-        assert result['status'] == 1
-        assert result['user_error'] == "'Could not prepare algorithm (returned False)'"
+        assert result["status"] == 1
+        assert result["user_error"] == "'Could not prepare algorithm (returned False)'"
 
     @slow
     def test_single_1_setup_error(self):
-        result = self.execute('user/user/single/1/setup_error', [None])
+        result = self.execute("user/user/single/1/setup_error", [None])
 
-        assert result['status'] == 1
-        assert result['user_error'] == "'Could not setup algorithm (returned False)'"
+        assert result["status"] == 1
+        assert result["user_error"] == "'Could not setup algorithm (returned False)'"
diff --git a/beat/core/test/test_experiment_loading.py b/beat/core/test/test_experiment_loading.py
index 541ad7964d7979c1645c0f1109bc45c7767386b0..51ad54494be0f34cbbde01dd827a029f228a8d48 100644
--- a/beat/core/test/test_experiment_loading.py
+++ b/beat/core/test/test_experiment_loading.py
@@ -1,29 +1,37 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
 
 
 import six
@@ -33,83 +41,88 @@ from ..experiment import Experiment
 from . import prefix, tmp_prefix
 from .utils import cleanup
 
+
 def test_load_valid_experiment():
 
-    experiment = Experiment(prefix, 'user/integers_addition/1/integers_addition')
+    experiment = Experiment(prefix, "user/integers_addition/1/integers_addition")
 
-    assert experiment.valid, '\n  * %s' % '\n  * '.join(experiment.errors)
-    nose.tools.eq_(experiment.label,
-            'user/user/integers_addition/1/integers_addition')
+    assert experiment.valid, "\n  * %s" % "\n  * ".join(experiment.errors)
+    nose.tools.eq_(experiment.label, "user/user/integers_addition/1/integers_addition")
 
-    assert experiment.toolchain.valid, '\n  * %s' % '\n  * '.join(experiment.toolchain.errors)
-    nose.tools.eq_(experiment.toolchain.name, 'user/integers_addition/1')
+    assert experiment.toolchain.valid, "\n  * %s" % "\n  * ".join(
+        experiment.toolchain.errors
+    )
+    nose.tools.eq_(experiment.toolchain.name, "user/integers_addition/1")
 
     nose.tools.eq_(len(experiment.datasets), 1)
-    assert 'integers' in experiment.datasets
+    assert "integers" in experiment.datasets
     nose.tools.eq_(len(experiment.databases), 1)
     nose.tools.eq_(len(experiment.blocks), 1)
     nose.tools.eq_(len(experiment.analyzers), 1)
 
     nose.tools.eq_(len(experiment.algorithms), 2)
-    assert 'user/sum/1' in experiment.algorithms
-    assert experiment.algorithms['user/sum/1'].valid
-    assert 'user/integers_analysis/1' in experiment.algorithms
-    assert experiment.algorithms['user/integers_analysis/1'].valid
+    assert "user/sum/1" in experiment.algorithms
+    assert experiment.algorithms["user/sum/1"].valid
+    assert "user/integers_analysis/1" in experiment.algorithms
+    assert experiment.algorithms["user/integers_analysis/1"].valid
+
 
 def test_load_one_dataset_two_blocks_toolchain():
 
-    experiment = Experiment(prefix, 'user/integers_addition/2/integers_addition')
-    assert experiment.valid, '\n  * %s' % '\n  * '.join(experiment.errors)
-    nose.tools.eq_(experiment.label,
-            'user/user/integers_addition/2/integers_addition')
+    experiment = Experiment(prefix, "user/integers_addition/2/integers_addition")
+    assert experiment.valid, "\n  * %s" % "\n  * ".join(experiment.errors)
+    nose.tools.eq_(experiment.label, "user/user/integers_addition/2/integers_addition")
 
-    assert experiment.toolchain.valid, '\n  * %s' % '\n  * '.join(experiment.toolchain.errors)
-    nose.tools.eq_(experiment.toolchain.name, 'user/integers_addition/2')
+    assert experiment.toolchain.valid, "\n  * %s" % "\n  * ".join(
+        experiment.toolchain.errors
+    )
+    nose.tools.eq_(experiment.toolchain.name, "user/integers_addition/2")
 
     nose.tools.eq_(len(experiment.datasets), 1)
-    assert 'integers' in experiment.datasets
+    assert "integers" in experiment.datasets
     nose.tools.eq_(len(experiment.databases), 1)
     nose.tools.eq_(len(experiment.blocks), 2)
     nose.tools.eq_(len(experiment.analyzers), 1)
 
     nose.tools.eq_(len(experiment.algorithms), 2)
-    assert 'user/sum/1' in experiment.algorithms
-    assert experiment.algorithms['user/sum/1'].valid
-    assert 'user/integers_analysis/1' in experiment.algorithms
-    assert experiment.algorithms['user/integers_analysis/1'].valid
+    assert "user/sum/1" in experiment.algorithms
+    assert experiment.algorithms["user/sum/1"].valid
+    assert "user/integers_analysis/1" in experiment.algorithms
+    assert experiment.algorithms["user/integers_analysis/1"].valid
+
 
 def test_load_two_datasets_three_blocks_toolchain():
 
-    experiment = Experiment(prefix, 'user/integers_addition/3/integers_addition')
+    experiment = Experiment(prefix, "user/integers_addition/3/integers_addition")
     assert not experiment.valid
-    nose.tools.eq_(experiment.label,
-            'user/user/integers_addition/3/integers_addition')
+    nose.tools.eq_(experiment.label, "user/user/integers_addition/3/integers_addition")
     assert experiment.errors[0].find("mismatch in input/output") != -1
 
     assert experiment.toolchain.valid
-    nose.tools.eq_(experiment.toolchain.name, 'user/integers_addition/3')
+    nose.tools.eq_(experiment.toolchain.name, "user/integers_addition/3")
 
     nose.tools.eq_(len(experiment.datasets), 2)
-    assert 'integers1' in experiment.datasets
-    assert 'integers2' in experiment.datasets
+    assert "integers1" in experiment.datasets
+    assert "integers2" in experiment.datasets
     nose.tools.eq_(len(experiment.databases), 1)
     nose.tools.eq_(len(experiment.blocks), 3)
     nose.tools.eq_(len(experiment.analyzers), 1)
 
     nose.tools.eq_(len(experiment.algorithms), 2)
-    assert 'user/sum/1' in experiment.algorithms
-    assert experiment.algorithms['user/sum/1'].valid
-    assert 'user/integers_analysis/1' in experiment.algorithms
-    assert experiment.algorithms['user/integers_analysis/1'].valid
+    assert "user/sum/1" in experiment.algorithms
+    assert experiment.algorithms["user/sum/1"].valid
+    assert "user/integers_analysis/1" in experiment.algorithms
+    assert experiment.algorithms["user/integers_analysis/1"].valid
+
 
 def test_no_description():
 
-    experiment = Experiment(prefix, 'user/integers_addition/1/integers_addition')
-    assert experiment.valid, '\n  * %s' % '\n  * '.join(experiment.errors)
+    experiment = Experiment(prefix, "user/integers_addition/1/integers_addition")
+    assert experiment.valid, "\n  * %s" % "\n  * ".join(experiment.errors)
     assert experiment.description is None
     assert experiment.documentation is None
 
-    description = 'This is my descriptor'
+    description = "This is my descriptor"
     experiment.description = description
     assert isinstance(experiment.description, six.string_types)
     nose.tools.eq_(experiment.description, description)
@@ -118,12 +131,12 @@ def test_no_description():
 @nose.tools.with_setup(teardown=cleanup)
 def test_export():
 
-    name = 'user/integers_addition/1/integers_addition'
+    name = "user/integers_addition/1/integers_addition"
     obj = Experiment(prefix, name)
-    assert obj.valid, '\n  * %s' % '\n  * '.join(obj.errors)
+    assert obj.valid, "\n  * %s" % "\n  * ".join(obj.errors)
 
     obj.export(tmp_prefix)
 
     # load from tmp_prefix and validates
     exported = Experiment(tmp_prefix, name)
-    assert exported.valid, '\n  * %s' % '\n  * '.join(exported.errors)
+    assert exported.valid, "\n  * %s" % "\n  * ".join(exported.errors)
diff --git a/beat/core/test/test_format_array.py b/beat/core/test/test_format_array.py
index e96025ea09855115f9adfe7567aeef45c30545f6..f3f470283d728bef086a193bb581991e2cd50149 100644
--- a/beat/core/test/test_format_array.py
+++ b/beat/core/test/test_format_array.py
@@ -1,29 +1,37 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
 
 
 import nose.tools
@@ -34,6 +42,6 @@ from . import prefix
 
 
 def test_array_of_arrays_does_not_validate():
-    df = DataFormat(prefix, 'user/array_of_array/1') #not allowed
+    df = DataFormat(prefix, "user/array_of_array/1")  # not allowed
     assert df.valid is False
-    assert df.errors[0].find('is not valid under any of the given schemas') != -1
+    assert df.errors[0].find("is not valid under any of the given schemas") != -1
diff --git a/beat/core/test/test_format_composed.py b/beat/core/test/test_format_composed.py
index ae8a52886c619a090e9ebf8142bee7178ec5f9e0..58f30719e46b7317dfcefcfde672b1d0b2ff056f 100644
--- a/beat/core/test/test_format_composed.py
+++ b/beat/core/test/test_format_composed.py
@@ -1,29 +1,37 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
 
 
 import os
@@ -35,9 +43,10 @@ from ..dataformat import DataFormat
 
 from . import prefix
 
+
 def test_valid():
 
-    df = DataFormat(prefix, 'user/composed/1')
+    df = DataFormat(prefix, "user/composed/1")
     assert df.valid
 
     ftype = df.type
@@ -50,29 +59,26 @@ def test_valid():
     assert numpy.issubdtype(ftype.floats.value64, numpy.float64)
 
     obj = ftype(
-            integers=dict(
-                value8=numpy.int8(2**6),
-                value16=numpy.int16(2**14),
-                value32=numpy.int32(2**30),
-                value64=numpy.int64(2**62),
-                ),
-            floats=dict(
-                value32=numpy.float32(3.14),
-                value64=numpy.float64(2.78),
-                ),
-            )
+        integers=dict(
+            value8=numpy.int8(2 ** 6),
+            value16=numpy.int16(2 ** 14),
+            value32=numpy.int32(2 ** 30),
+            value64=numpy.int64(2 ** 62),
+        ),
+        floats=dict(value32=numpy.float32(3.14), value64=numpy.float64(2.78)),
+    )
 
     nose.tools.eq_(obj.integers.value8.dtype, numpy.int8)
-    nose.tools.eq_(obj.integers.value8, 2**6)
+    nose.tools.eq_(obj.integers.value8, 2 ** 6)
 
     nose.tools.eq_(obj.integers.value16.dtype, numpy.int16)
-    nose.tools.eq_(obj.integers.value16, 2**14)
+    nose.tools.eq_(obj.integers.value16, 2 ** 14)
 
     nose.tools.eq_(obj.integers.value32.dtype, numpy.int32)
-    nose.tools.eq_(obj.integers.value32, 2**30)
+    nose.tools.eq_(obj.integers.value32, 2 ** 30)
 
     nose.tools.eq_(obj.integers.value64.dtype, numpy.int64)
-    nose.tools.eq_(obj.integers.value64, 2**62)
+    nose.tools.eq_(obj.integers.value64, 2 ** 62)
 
     nose.tools.eq_(obj.floats.value32.dtype, numpy.float32)
     assert numpy.isclose(obj.floats.value32, 3.14)
@@ -83,16 +89,23 @@ def test_valid():
     # checks JSON enconding
     copy = ftype()
     copy.from_dict(obj.as_dict())
-    assert copy.isclose(obj), "%r is not close enough to %r" % (copy.as_dict(), obj.as_dict())
+    assert copy.isclose(obj), "%r is not close enough to %r" % (
+        copy.as_dict(),
+        obj.as_dict(),
+    )
 
     # checks binary encoding
     copy = ftype()
     copy.unpack(obj.pack())
-    assert copy.isclose(obj), "%r is not close enough to %r" % (copy.as_dict(), obj.as_dict())
+    assert copy.isclose(obj), "%r is not close enough to %r" % (
+        copy.as_dict(),
+        obj.as_dict(),
+    )
+
 
 def test_invalid():
 
-    df = DataFormat(prefix, 'user/composed_unknown/1')
+    df = DataFormat(prefix, "user/composed_unknown/1")
     assert df.valid is False
-    assert df.errors[0].find('referred dataformat') != -1
-    assert df.errors[0].find('invalid') != -1
+    assert df.errors[0].find("referred dataformat") != -1
+    assert df.errors[0].find("invalid") != -1
diff --git a/beat/core/test/test_format_extends.py b/beat/core/test/test_format_extends.py
index b638b33d1c2a47946ee6048107e2f598db422847..d71d5e26484beac867ce773b575b3b4962a058d1 100644
--- a/beat/core/test/test_format_extends.py
+++ b/beat/core/test/test_format_extends.py
@@ -1,29 +1,37 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
 
 
 import nose.tools
@@ -33,20 +41,20 @@ from ..dataformat import DataFormat
 from . import prefix
 
 
-#----------------------------------------------------------
+# ----------------------------------------------------------
 
 
 def test_invalid():
-    df = DataFormat(prefix, 'user/extended_unknown/1') #not allowed
+    df = DataFormat(prefix, "user/extended_unknown/1")  # not allowed
     assert df.valid is False
-    assert df.errors[0].find('referred dataformat') != -1
-    assert df.errors[0].find('user/unknown/1') != -1
+    assert df.errors[0].find("referred dataformat") != -1
+    assert df.errors[0].find("user/unknown/1") != -1
 
 
-#----------------------------------------------------------
+# ----------------------------------------------------------
 
 
 def test_name_clash():
-    df = DataFormat(prefix, 'user/extended_name_clash/1') #not allowed
+    df = DataFormat(prefix, "user/extended_name_clash/1")  # not allowed
     assert df.valid is False
-    assert df.errors[0].find('clashes with an attribute with the same') != -1
+    assert df.errors[0].find("clashes with an attribute with the same") != -1
diff --git a/beat/core/test/test_format_load.py b/beat/core/test/test_format_load.py
index b0829a732b5a49b269c9379a300cad9da9c52b33..9e253050cb09709ced48a75b904c6cc0dc0ae36f 100644
--- a/beat/core/test/test_format_load.py
+++ b/beat/core/test/test_format_load.py
@@ -1,29 +1,37 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
 
 
 import os
@@ -37,121 +45,135 @@ from ..dataformat import DataFormat
 from . import prefix, tmp_prefix
 from .utils import cleanup
 
+
 def test_load_default_format():
 
     df = DataFormat(prefix, data=None)
-    assert df.valid, '\n  * %s' % '\n  * '.join(df.errors)
+    assert df.valid, "\n  * %s" % "\n  * ".join(df.errors)
+
 
 def test_load_unknown_format():
 
-    df = DataFormat(prefix, 'user/unknown/1')
+    df = DataFormat(prefix, "user/unknown/1")
     assert df.valid is False
     assert df.errors
     nose.tools.eq_(len(df.errors), 1)
-    assert df.errors[0].find('file not found') != -1
+    assert df.errors[0].find("file not found") != -1
+
 
 def test_load_invalid_format():
 
-    df = DataFormat(prefix, 'user/invalid/1')
+    df = DataFormat(prefix, "user/invalid/1")
     assert df.valid is False
     assert df.errors
     nose.tools.eq_(len(df.errors), 1)
-    assert df.errors[0].find('invalid JSON code') != -1
+    assert df.errors[0].find("invalid JSON code") != -1
+
 
 def test_load_valid_format():
 
-    df = DataFormat(prefix, 'user/single_integer/1')
-    assert df.valid, '\n  * %s' % '\n  * '.join(df.errors)
+    df = DataFormat(prefix, "user/single_integer/1")
+    assert df.valid, "\n  * %s" % "\n  * ".join(df.errors)
     nose.tools.eq_(len(df.errors), 0)
 
+
 @nose.tools.raises(RuntimeError)
 def test_fail_to_create_data_of_unknown_format():
 
-    df = DataFormat(prefix, 'user/unknown/1')
+    df = DataFormat(prefix, "user/unknown/1")
     assert df.valid is False
     assert df.type
 
+
 def test_fail_to_load_format_with_several_invalid_types():
 
-    df = DataFormat(prefix, 'user/errors/1')
+    df = DataFormat(prefix, "user/errors/1")
     assert df.valid is False
     nose.tools.eq_(len(df.errors), 1)
-    assert df.errors[0].find('is not valid under any of the given schemas') != -1
+    assert df.errors[0].find("is not valid under any of the given schemas") != -1
+
 
 def test_load_valid_format_from_JSON_declaration():
 
-    df = DataFormat(prefix, dict(value='int32'))
-    assert df.valid, '\n  * %s' % '\n  * '.join(df.errors)
-    assert df.name == '__unnamed_dataformat__'
+    df = DataFormat(prefix, dict(value="int32"))
+    assert df.valid, "\n  * %s" % "\n  * ".join(df.errors)
+    assert df.name == "__unnamed_dataformat__"
+
 
 def test_load_versioned_format():
 
-    df1 = DataFormat(prefix, 'user/versioned/1')
-    assert df1.valid, '\n  * %s' % '\n  * '.join(df1.errors)
-    nose.tools.eq_(df1.name, 'user/versioned/1')
+    df1 = DataFormat(prefix, "user/versioned/1")
+    assert df1.valid, "\n  * %s" % "\n  * ".join(df1.errors)
+    nose.tools.eq_(df1.name, "user/versioned/1")
 
-    df2 = DataFormat(prefix, 'user/versioned/2')
-    assert df2.valid, '\n  * %s' % '\n  * '.join(df2.errors)
-    nose.tools.eq_(df2.name, 'user/versioned/2')
+    df2 = DataFormat(prefix, "user/versioned/2")
+    assert df2.valid, "\n  * %s" % "\n  * ".join(df2.errors)
+    nose.tools.eq_(df2.name, "user/versioned/2")
 
     ftype = df2.type
     instance = ftype(value=numpy.float32(32))
     assert isinstance(instance.value, numpy.float32)
 
+
 def test_no_description():
 
-    df = DataFormat(prefix, 'user/versioned/1')
-    assert df.valid, '\n  * %s' % '\n  * '.join(df.errors)
+    df = DataFormat(prefix, "user/versioned/1")
+    assert df.valid, "\n  * %s" % "\n  * ".join(df.errors)
     assert df.description is None
     assert df.documentation is None
 
-    description = 'This is my descriptor'
+    description = "This is my descriptor"
     df.description = description
     assert isinstance(df.description, six.string_types)
     nose.tools.eq_(df.description, description)
 
+
 def test_with_description():
 
-    df = DataFormat(prefix, 'user/versioned/2')
-    assert df.valid, '\n  * %s' % '\n  * '.join(df.errors)
+    df = DataFormat(prefix, "user/versioned/2")
+    assert df.valid, "\n  * %s" % "\n  * ".join(df.errors)
     assert isinstance(df.description, six.string_types)
     assert len(df.description) != 0
     assert df.documentation is None
 
+
 def test_description_does_not_affect_hash():
 
-    df2 = DataFormat(prefix, 'user/versioned/2')
-    assert df2.valid, '\n  * %s' % '\n  * '.join(df2.errors)
-    df3 = DataFormat(prefix, 'user/versioned/3') #the same, but no description
-    assert df3.valid, '\n  * %s' % '\n  * '.join(df3.errors)
+    df2 = DataFormat(prefix, "user/versioned/2")
+    assert df2.valid, "\n  * %s" % "\n  * ".join(df2.errors)
+    df3 = DataFormat(prefix, "user/versioned/3")  # the same, but no description
+    assert df3.valid, "\n  * %s" % "\n  * ".join(df3.errors)
     assert df2.hash() == df3.hash()
 
+
 def test_load_direct_recursion():
 
-    df = DataFormat(prefix, 'user/direct_recursion/1')
+    df = DataFormat(prefix, "user/direct_recursion/1")
     assert df.valid is False
     assert df.errors
-    assert df.errors[0].find('recursion for') != -1
-    assert df.errors[0].find('user/direct_recursion/1') != -1
+    assert df.errors[0].find("recursion for") != -1
+    assert df.errors[0].find("user/direct_recursion/1") != -1
+
 
 def test_load_indirect_recursion():
 
-    df = DataFormat(prefix, 'user/indirect_recursion_top/1')
+    df = DataFormat(prefix, "user/indirect_recursion_top/1")
     assert df.valid is False
     assert df.errors
     nose.tools.eq_(len(df.errors), 1)
-    assert df.errors[0].find('is invalid') != -1
-    assert df.errors[0].find('user/indirect_recursion_bottom/1') != -1
+    assert df.errors[0].find("is invalid") != -1
+    assert df.errors[0].find("user/indirect_recursion_bottom/1") != -1
+
 
 @nose.tools.with_setup(teardown=cleanup)
 def test_export():
 
-    name = 'user/composed/1'
+    name = "user/composed/1"
     obj = DataFormat(prefix, name)
-    assert obj.valid, '\n  * %s' % '\n  * '.join(obj.errors)
+    assert obj.valid, "\n  * %s" % "\n  * ".join(obj.errors)
 
     obj.export(tmp_prefix)
 
     # load from tmp_prefix and validates
     exported = DataFormat(tmp_prefix, name)
-    assert exported.valid, '\n  * %s' % '\n  * '.join(exported.errors)
+    assert exported.valid, "\n  * %s" % "\n  * ".join(exported.errors)
diff --git a/beat/core/test/test_hash.py b/beat/core/test/test_hash.py
index ec4a59bf7140a9af95d5219f7f0518b2bc6b2d92..2723aef2cbaa6aa26f7e6445a6e5b9cc4ea88f10 100644
--- a/beat/core/test/test_hash.py
+++ b/beat/core/test/test_hash.py
@@ -1,202 +1,242 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
 
 
 import nose.tools
 from .. import hash
 
 
-#----------------------------------------------------------
+# ----------------------------------------------------------
 
 
 def test_block_output_hash():
 
     h = hash.hashBlockOutput(
-            'some_block',
-            'some_algorithm',
-            '12345',
-            { "param1": 100 },
-            { "name": "environment", "version": "1" },
-            { "some_input": hash.hashDataset('some_database/1',
-                'some_protocol',' some_set') },
-            'some_output',
+        "some_block",
+        "some_algorithm",
+        "12345",
+        {"param1": 100},
+        {"name": "environment", "version": "1"},
+        {
+            "some_input": hash.hashDataset(
+                "some_database/1", "some_protocol", " some_set"
             )
+        },
+        "some_output",
+    )
     assert h is not None
     assert isinstance(h, str)
     assert len(h) > 0
 
 
-#----------------------------------------------------------
+# ----------------------------------------------------------
 
 
 def test_block_output_hash_repeatability():
 
     h1 = hash.hashBlockOutput(
-            'some_block',
-            'some_algorithm',
-            '12345',
-            { "param1": 100 },
-            { "name": "environment", "version": "1" },
-            { "some_input": hash.hashDataset('some_database/1',
-                'some_protocol',' some_set') },
-            'some_output',
+        "some_block",
+        "some_algorithm",
+        "12345",
+        {"param1": 100},
+        {"name": "environment", "version": "1"},
+        {
+            "some_input": hash.hashDataset(
+                "some_database/1", "some_protocol", " some_set"
             )
+        },
+        "some_output",
+    )
 
-    h2 = hash.hashBlockOutput('some_block',
-            'some_algorithm',
-            '12345',
-            { "param1": 100 },
-            { "name": "environment", "version": "1" },
-            { "some_input": hash.hashDataset('some_database/1',
-                'some_protocol',' some_set') },
-            'some_output',
+    h2 = hash.hashBlockOutput(
+        "some_block",
+        "some_algorithm",
+        "12345",
+        {"param1": 100},
+        {"name": "environment", "version": "1"},
+        {
+            "some_input": hash.hashDataset(
+                "some_database/1", "some_protocol", " some_set"
             )
+        },
+        "some_output",
+    )
 
     nose.tools.eq_(h1, h2)
 
 
-#----------------------------------------------------------
+# ----------------------------------------------------------
 
 
 def test_different_block_output_hash():
 
     h1 = hash.hashBlockOutput(
-            'some_block',
-            'some_algorithm',
-            '12345', { "param1": 100 },
-            { "name": "environment", "version": "1" },
-            { "some_input": hash.hashDataset('some_database/1',
-                'some_protocol',' some_set') },
-            'output1',
+        "some_block",
+        "some_algorithm",
+        "12345",
+        {"param1": 100},
+        {"name": "environment", "version": "1"},
+        {
+            "some_input": hash.hashDataset(
+                "some_database/1", "some_protocol", " some_set"
             )
+        },
+        "output1",
+    )
 
     h2 = hash.hashBlockOutput(
-            'some_block',
-            'some_algorithm',
-            '12345',
-            { "param1": 100 },
-            { "name": "environment", "version": "1" },
-            { "some_input": hash.hashDataset('some_database/1',
-                'some_protocol',' some_set') },
-            'output2'
+        "some_block",
+        "some_algorithm",
+        "12345",
+        {"param1": 100},
+        {"name": "environment", "version": "1"},
+        {
+            "some_input": hash.hashDataset(
+                "some_database/1", "some_protocol", " some_set"
             )
+        },
+        "output2",
+    )
 
     assert h1 != h2, "%r != %r" % (h1, h2)
 
 
-#----------------------------------------------------------
+# ----------------------------------------------------------
 
 
 def test_analyzer_hash():
 
     h = hash.hashAnalyzer(
-            'some_block',
-            'some_algorithm',
-            '12345',
-            { "param1": 100 },
-            { "name": "environment", "version": "1" },
-            { "some_input": hash.hashDataset('some_database/1',
-                'some_protocol',' some_set') },
+        "some_block",
+        "some_algorithm",
+        "12345",
+        {"param1": 100},
+        {"name": "environment", "version": "1"},
+        {
+            "some_input": hash.hashDataset(
+                "some_database/1", "some_protocol", " some_set"
             )
+        },
+    )
 
     assert h is not None
     assert isinstance(h, str)
     assert len(h) > 0
 
 
-#----------------------------------------------------------
+# ----------------------------------------------------------
 
 
 def test_analyzer_hash_repeatability():
 
     h1 = hash.hashAnalyzer(
-            'some_block',
-            'some_algorithm',
-            '12345',
-            { "param1": 100 },
-            { "name": "environment", "version": "1" },
-            { "some_input": hash.hashDataset('some_database/1',
-                'some_protocol',' some_set') },
+        "some_block",
+        "some_algorithm",
+        "12345",
+        {"param1": 100},
+        {"name": "environment", "version": "1"},
+        {
+            "some_input": hash.hashDataset(
+                "some_database/1", "some_protocol", " some_set"
             )
+        },
+    )
 
     h2 = hash.hashAnalyzer(
-            'some_block',
-            'some_algorithm',
-            '12345',
-            { "param1": 100 },
-            { "name": "environment", "version": "1" },
-            { "some_input": hash.hashDataset('some_database/1',
-                'some_protocol',' some_set') },
+        "some_block",
+        "some_algorithm",
+        "12345",
+        {"param1": 100},
+        {"name": "environment", "version": "1"},
+        {
+            "some_input": hash.hashDataset(
+                "some_database/1", "some_protocol", " some_set"
             )
+        },
+    )
 
     nose.tools.eq_(h1, h2)
 
 
-#----------------------------------------------------------
+# ----------------------------------------------------------
 
 
 def test_different_analyzer_hash():
 
     h1 = hash.hashAnalyzer(
-            'some_block',
-            'some_algorithm',
-            '12345',
-            { "param1": 100 },
-            { "name": "environment", "version": "1" },
-            { "some_input": hash.hashDataset('some_database/1',
-                'some_protocol',' some_set') },
+        "some_block",
+        "some_algorithm",
+        "12345",
+        {"param1": 100},
+        {"name": "environment", "version": "1"},
+        {
+            "some_input": hash.hashDataset(
+                "some_database/1", "some_protocol", " some_set"
             )
+        },
+    )
 
     h2 = hash.hashAnalyzer(
-            'some_block',
-            'some_algorithm',
-            '67890',
-            { "param1": 100 },
-            { "name": "environment", "version": "1" },
-            { "some_input": hash.hashDataset('some_database/1',
-                'some_protocol',' some_set') },
+        "some_block",
+        "some_algorithm",
+        "67890",
+        {"param1": 100},
+        {"name": "environment", "version": "1"},
+        {
+            "some_input": hash.hashDataset(
+                "some_database/1", "some_protocol", " some_set"
             )
+        },
+    )
 
     assert h1 != h2, "%r != %r" % (h1, h2)
 
 
-#----------------------------------------------------------
+# ----------------------------------------------------------
 
 
 def test_path_from_hash():
 
-    h = hash.hashDataset('some_database/1', 'some_protocol',' some_set')
+    h = hash.hashDataset("some_database/1", "some_protocol", " some_set")
     path = hash.toPath(h)
 
     assert path is not None
     assert isinstance(path, str)
     assert len(path) > 0
 
-    parts = path.split('/')
+    parts = path.split("/")
 
     assert len(parts) > 1
 
diff --git a/beat/core/test/test_invalid_database.py b/beat/core/test/test_invalid_database.py
index 9970982eaa35bbc5174c091fa093c4eb96da6d20..4326eff0536398ba3bed2a514c514b0c013c4dc3 100644
--- a/beat/core/test/test_invalid_database.py
+++ b/beat/core/test/test_invalid_database.py
@@ -1,29 +1,37 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
 
 
 import nose.tools
@@ -32,6 +40,7 @@ from ..database import Database
 from . import prefix
 
 import logging
+
 logger = logging.getLogger(__name__)
 
 
@@ -42,54 +51,77 @@ def doit(filename, error_msg):
     found = False
 
     for msg in database.errors:
-        logger.error('%s %s', msg, error_msg)
+        logger.error("%s %s", msg, error_msg)
         if msg.find(error_msg) != -1:
             found = True
             break
 
-    assert found, "cannot find message `%s' on error list (%s) from loading database file `%s'" % (error_msg, database.errors, filename)
+    assert found, (
+        "cannot find message `%s' on error list (%s) from loading database file `%s'"
+        % (error_msg, database.errors, filename)
+    )
+
 
 def test_load_unknown_database():
-    doit('unknown/1', 'file not found')
+    doit("unknown/1", "file not found")
+
 
 def test_load_invalid_database():
-    doit('invalid/1', 'invalid JSON code')
+    doit("invalid/1", "invalid JSON code")
+
 
 def test_load_database_without_protocols_list():
-    doit('missing_protocols/1', "%r is a required property" % u'protocols')
+    doit("missing_protocols/1", "%r is a required property" % u"protocols")
+
 
 def test_load_database_with_empty_protocols_list():
-    doit('empty_protocols/1', "/protocols: [] is too short")
+    doit("empty_protocols/1", "/protocols: [] is too short")
+
 
 def test_load_database_with_missing_protocol_name():
-    doit('missing_protocol_name/1', "/protocols/0: %r is a required property" % u'name')
+    doit("missing_protocol_name/1", "/protocols/0: %r is a required property" % u"name")
+
 
 def test_load_database_with_mixed_protocol_names():
-    doit('mixed_protocol_names/1', "None is not of type %r" % u'string')
+    doit("mixed_protocol_names/1", "None is not of type %r" % u"string")
+
 
 def test_load_database_with_same_protocol_names():
-    doit('same_protocol_names/1', "found different protocols with the same name:")
+    doit("same_protocol_names/1", "found different protocols with the same name:")
+
 
 def test_load_database_with_missing_protocol_sets():
-    doit('missing_protocol_sets/1', "%r is a required property" % u'sets')
+    doit("missing_protocol_sets/1", "%r is a required property" % u"sets")
+
 
 def test_load_database_with_empty_protocol_sets():
-    doit('empty_protocol_sets/1', 'rule: /properties/protocols/items/properties/sets/minItems')
+    doit(
+        "empty_protocol_sets/1",
+        "rule: /properties/protocols/items/properties/sets/minItems",
+    )
+
 
 def test_load_database_with_missing_set_name():
-    doit('missing_set_name/1', "%r is a required property" % u'name')
+    doit("missing_set_name/1", "%r is a required property" % u"name")
+
 
 def test_load_database_with_mixed_set_names():
-    doit('mixed_set_names/1', "name: None is not of type %r" % u'string')
+    doit("mixed_set_names/1", "name: None is not of type %r" % u"string")
+
 
 def test_load_database_with_same_set_names():
-    doit('same_set_names/1', "found different sets with the same name")
+    doit("same_set_names/1", "found different sets with the same name")
+
 
 def test_load_database_with_missing_set_view():
-    doit('missing_set_view/1', "%r is a required property" % u'view')
+    doit("missing_set_view/1", "%r is a required property" % u"view")
+
 
 def test_load_database_with_missing_set_outputs_list():
-    doit('missing_set_outputs/1', "%r is a required property" % u'outputs')
+    doit("missing_set_outputs/1", "%r is a required property" % u"outputs")
+
 
 def test_load_database_with_empty_set_outputs_list():
-    doit('empty_set_outputs/1', 'outputs: OrderedDict() does not have enough properties')
+    doit(
+        "empty_set_outputs/1", "outputs: OrderedDict() does not have enough properties"
+    )
diff --git a/beat/core/test/test_lib.py b/beat/core/test/test_lib.py
index 6d2521c5056a9c02378256f563f6bc51e847050f..ccc3455fbcfd4398a1dfff58f6ef6edc7fcd510f 100644
--- a/beat/core/test/test_lib.py
+++ b/beat/core/test/test_lib.py
@@ -1,29 +1,37 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
 
 
 import sys
@@ -38,80 +46,80 @@ from ..library import Library, Storage
 
 def test_valid():
 
-    l = Library(prefix, 'user/valid/1')
-    assert l.valid, '\n  * %s' % '\n  * '.join(l.errors)
+    l = Library(prefix, "user/valid/1")
+    assert l.valid, "\n  * %s" % "\n  * ".join(l.errors)
     nose.tools.eq_(len(l.uses), 0)
     nose.tools.eq_(len(l.libraries), 0)
 
     # tries to call the function `f()' on that library
     module = l.load()
     assert isinstance(module, types.ModuleType)
-    nose.tools.eq_(module.f(), 'OK')
-    nose.tools.eq_(module.pyver(), '%d.%d' % sys.version_info[:2])
+    nose.tools.eq_(module.f(), "OK")
+    nose.tools.eq_(module.pyver(), "%d.%d" % sys.version_info[:2])
 
 
 def test_nested_1():
 
-    l = Library(prefix, 'user/nest1/1')
-    assert l.valid, '\n  * %s' % '\n  * '.join(l.errors)
+    l = Library(prefix, "user/nest1/1")
+    assert l.valid, "\n  * %s" % "\n  * ".join(l.errors)
     nose.tools.eq_(len(l.uses), 1)
     nose.tools.eq_(len(l.libraries), 1)
 
     # tries to call the function `f()' on that library
     module = l.load()
     assert isinstance(module, types.ModuleType)
-    nose.tools.eq_(module.f('-extra'), 'OK-extra')
-    nose.tools.eq_(module.pyver('-extra'), '%d.%d-extra' % sys.version_info[:2])
+    nose.tools.eq_(module.f("-extra"), "OK-extra")
+    nose.tools.eq_(module.pyver("-extra"), "%d.%d-extra" % sys.version_info[:2])
 
 
 def test_nested_2():
 
-    l = Library(prefix, 'user/nest2/1')
-    assert l.valid, '\n  * %s' % '\n  * '.join(l.errors)
+    l = Library(prefix, "user/nest2/1")
+    assert l.valid, "\n  * %s" % "\n  * ".join(l.errors)
     nose.tools.eq_(len(l.uses), 1)
     nose.tools.eq_(len(l.libraries), 1)
 
     # tries to call the function `f()' on that library
     module = l.load()
     assert isinstance(module, types.ModuleType)
-    nose.tools.eq_(module.f('-x'), 'OK-x-x')
-    nose.tools.eq_(module.pyver('-x'), '%d.%d-x-x' % sys.version_info[:2])
+    nose.tools.eq_(module.f("-x"), "OK-x-x")
+    nose.tools.eq_(module.pyver("-x"), "%d.%d-x-x" % sys.version_info[:2])
 
 
 def test_direct_recursion():
 
-    l = Library(prefix, 'user/direct_recursion/1')
+    l = Library(prefix, "user/direct_recursion/1")
     assert not l.valid
     nose.tools.eq_(len(l.errors), 1)
-    assert l.errors[0].find('recursion for library') != -1
+    assert l.errors[0].find("recursion for library") != -1
     assert l.errors[0].find(l.name) != -1
 
 
 def test_indirect_recursion():
 
-    l = Library(prefix, 'user/indirect_recursion/1')
+    l = Library(prefix, "user/indirect_recursion/1")
     assert not l.valid
     nose.tools.eq_(len(l.errors), 1)
-    assert l.errors[0].find('referred library') != -1
-    assert l.errors[0].find('user/indirect_recursion_next/1') != -1
+    assert l.errors[0].find("referred library") != -1
+    assert l.errors[0].find("user/indirect_recursion_next/1") != -1
 
 
 def test_invalid_mix():
 
-    l = Library(prefix, 'user/invalid_mix/1')
+    l = Library(prefix, "user/invalid_mix/1")
     assert not l.valid
     nose.tools.eq_(len(l.errors), 1)
-    assert l.errors[0].find('differs from current language') != -1
+    assert l.errors[0].find("differs from current language") != -1
 
 
 @nose.tools.with_setup(teardown=cleanup)
 def test_dependencies():
 
-    name = 'user/for_dep/1'
-    dep_name = 'user/dep/1'
+    name = "user/for_dep/1"
+    dep_name = "user/dep/1"
 
     l = Library(prefix, name)
-    assert l.valid, '\n  * %s' % '\n  * '.join(l.errors)
+    assert l.valid, "\n  * %s" % "\n  * ".join(l.errors)
     nose.tools.eq_(len(l.uses), 0)
     nose.tools.eq_(len(l.libraries), 0)
 
@@ -126,41 +134,41 @@ def test_dependencies():
 
     # Reload
     l = Library(tmp_prefix, name)
-    assert l.valid, '\n  * %s' % '\n  * '.join(l.errors)
+    assert l.valid, "\n  * %s" % "\n  * ".join(l.errors)
     l_dep = Library(tmp_prefix, dep_name)
     assert l_dep.valid
 
-    l.uses['dep1'] = l_dep.name
-    l.write() #rewrite
+    l.uses["dep1"] = l_dep.name
+    l.write()  # rewrite
 
     # Re-validate
     l = Library(tmp_prefix, name)
-    assert l.valid, '\n  * %s' % '\n  * '.join(l.errors)
+    assert l.valid, "\n  * %s" % "\n  * ".join(l.errors)
 
     nose.tools.eq_(len(l.uses), 1)
     nose.tools.eq_(len(l.libraries), 1)
-    nose.tools.eq_(list(l.uses.keys())[0], 'dep1')
-    nose.tools.eq_(list(l.uses.values())[0], 'user/dep/1')
+    nose.tools.eq_(list(l.uses.keys())[0], "dep1")
+    nose.tools.eq_(list(l.uses.values())[0], "user/dep/1")
 
-    l.uses = {} #reset
-    l.uses['mod1'] = l_dep.name
-    l.write() #rewrite
+    l.uses = {}  # reset
+    l.uses["mod1"] = l_dep.name
+    l.write()  # rewrite
 
     # Re-validate
     l = Library(tmp_prefix, name)
-    assert l.valid, '\n  * %s' % '\n  * '.join(l.errors)
+    assert l.valid, "\n  * %s" % "\n  * ".join(l.errors)
 
     nose.tools.eq_(len(l.uses), 1)
     nose.tools.eq_(len(l.libraries), 1)
-    nose.tools.eq_(list(l.uses.keys())[0], 'mod1')
-    nose.tools.eq_(list(l.uses.values())[0], 'user/dep/1')
+    nose.tools.eq_(list(l.uses.keys())[0], "mod1")
+    nose.tools.eq_(list(l.uses.values())[0], "user/dep/1")
 
-    l.uses = {} #reset
-    l.write() #rewrite
+    l.uses = {}  # reset
+    l.write()  # rewrite
 
     # Re-validate
     l = Library(tmp_prefix, name)
-    assert l.valid, '\n  * %s' % '\n  * '.join(l.errors)
+    assert l.valid, "\n  * %s" % "\n  * ".join(l.errors)
 
     nose.tools.eq_(len(l.uses), 0)
     nose.tools.eq_(len(l.libraries), 0)
@@ -168,31 +176,31 @@ def test_dependencies():
 
 @nose.tools.with_setup(teardown=cleanup)
 def test_adding_self():
-    name = 'user/for_dep/1'
+    name = "user/for_dep/1"
 
     l = Library(prefix, name)
-    assert l.valid, '\n  * %s' % '\n  * '.join(l.errors)
+    assert l.valid, "\n  * %s" % "\n  * ".join(l.errors)
     nose.tools.eq_(len(l.uses), 0)
     nose.tools.eq_(len(l.libraries), 0)
 
-    l.uses['dep'] = l.name
+    l.uses["dep"] = l.name
     new_storage = Storage(tmp_prefix, name)
-    l.write(new_storage) #rewrite
+    l.write(new_storage)  # rewrite
 
     # Re-validate
     l = Library(tmp_prefix, name)
     assert not l.valid
-    assert l.errors[0].find('recursion') != -1
+    assert l.errors[0].find("recursion") != -1
 
 
 @nose.tools.with_setup(teardown=cleanup)
 def test_invalid_dependencies():
 
-    name = 'user/for_dep/1'
-    dep_name = 'user/invalid_dep/1'
+    name = "user/for_dep/1"
+    dep_name = "user/invalid_dep/1"
 
     l = Library(prefix, name)
-    assert l.valid, '\n  * %s' % '\n  * '.join(l.errors)
+    assert l.valid, "\n  * %s" % "\n  * ".join(l.errors)
     nose.tools.eq_(len(l.uses), 0)
     nose.tools.eq_(len(l.libraries), 0)
 
@@ -207,27 +215,28 @@ def test_invalid_dependencies():
 
     # Reload
     l = Library(tmp_prefix, name)
-    assert l.valid, '\n  * %s' % '\n  * '.join(l.errors)
+    assert l.valid, "\n  * %s" % "\n  * ".join(l.errors)
     l_dep = Library(tmp_prefix, dep_name)
     assert l_dep.valid
 
-    l.uses['dep1'] = l_dep.name
-    l.write() #rewrite
+    l.uses["dep1"] = l_dep.name
+    l.write()  # rewrite
 
     # Re-validate
     l = Library(tmp_prefix, name)
     assert not l.valid
-    assert l.errors[0].find('differs from current language') != -1
+    assert l.errors[0].find("differs from current language") != -1
+
 
 @nose.tools.with_setup(teardown=cleanup)
 def test_export():
 
-    name = 'user/nest2/1'
+    name = "user/nest2/1"
     obj = Library(prefix, name)
-    assert obj.valid, '\n  * %s' % '\n  * '.join(obj.errors)
+    assert obj.valid, "\n  * %s" % "\n  * ".join(obj.errors)
 
     obj.export(tmp_prefix)
 
     # load from tmp_prefix and validates
     exported = Library(tmp_prefix, name)
-    assert exported.valid, '\n  * %s' % '\n  * '.join(exported.errors)
+    assert exported.valid, "\n  * %s" % "\n  * ".join(exported.errors)
diff --git a/beat/core/test/test_plotter.py b/beat/core/test/test_plotter.py
index 1caacce5fa9872a1f34501be114ffe1a60b71587..ab177759fb4740ba850ce1d4441e7206304a0990 100644
--- a/beat/core/test/test_plotter.py
+++ b/beat/core/test/test_plotter.py
@@ -1,29 +1,37 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
 
 
 import imghdr
@@ -37,6 +45,7 @@ from ..plotter import Plotter
 
 from . import prefix
 
+
 def test_default():
 
     p = Plotter(prefix, data=None)
@@ -45,110 +54,123 @@ def test_default():
 
 def test_scatter():
 
-    p = Plotter(prefix, 'user/scatter/1')
-    assert p.valid, '\n  * %s' % '\n  * '.join(p.errors)
+    p = Plotter(prefix, "user/scatter/1")
+    assert p.valid, "\n  * %s" % "\n  * ".join(p.errors)
 
 
 def do_plot(mimetype):
 
-    p = Plotter(prefix, 'user/scatter/1')
+    p = Plotter(prefix, "user/scatter/1")
     assert p.valid
 
     runnable = p.runner()
     assert runnable.ready is False
-    runnable.setup({
-        'xlabel': 'Temperature in C',
-        'ylabel': 'Icecream Sales in $',
-        'title': 'Temperature versus icecream sales',
-        'mimetype': mimetype
-        })
+    runnable.setup(
+        {
+            "xlabel": "Temperature in C",
+            "ylabel": "Icecream Sales in $",
+            "title": "Temperature versus icecream sales",
+            "mimetype": mimetype,
+        }
+    )
     assert runnable.ready
 
     # now produce the plot
-    data = p.dataformat.type(data=[
-        # temperature in C against icecream sales day-by-day
-        { 'x': 11.9, 'y': 185 },
-        { 'x': 14.2, 'y': 215 },
-        { 'x': 15.2, 'y': 332 },
-        { 'x': 16.4, 'y': 325 },
-        { 'x': 17.2, 'y': 408 },
-        { 'x': 18.1, 'y': 421 },
-        { 'x': 19.4, 'y': 412 },
-        { 'x': 18.5, 'y': 406 },
-        { 'x': 22.1, 'y': 522 },
-        { 'x': 22.6, 'y': 445 },
-        { 'x': 23.4, 'y': 544 },
-        { 'x': 25.1, 'y': 614 },
-        ])
+    data = p.dataformat.type(
+        data=[
+            # temperature in C against icecream sales day-by-day
+            {"x": 11.9, "y": 185},
+            {"x": 14.2, "y": 215},
+            {"x": 15.2, "y": 332},
+            {"x": 16.4, "y": 325},
+            {"x": 17.2, "y": 408},
+            {"x": 18.1, "y": 421},
+            {"x": 19.4, "y": 412},
+            {"x": 18.5, "y": 406},
+            {"x": 22.1, "y": 522},
+            {"x": 22.6, "y": 445},
+            {"x": 23.4, "y": 544},
+            {"x": 25.1, "y": 614},
+        ]
+    )
 
     return runnable.process(data)
 
 
 def test_plot_png():
-    fig = do_plot('image/png')
-    nose.tools.eq_(imghdr.what('test.png', fig), 'png')
-    #with open('test.png', 'wb') as f: f.write(fig)
+    fig = do_plot("image/png")
+    nose.tools.eq_(imghdr.what("test.png", fig), "png")
+    # with open('test.png', 'wb') as f: f.write(fig)
 
 
 def test_plot_jpeg():
-    fig = do_plot('image/jpeg')
-    nose.tools.eq_(imghdr.what('test.jpg', fig), 'jpeg')
-    #with open('test.jpg', 'wb') as f: f.write(fig)
+    fig = do_plot("image/jpeg")
+    nose.tools.eq_(imghdr.what("test.jpg", fig), "jpeg")
+    # with open('test.jpg', 'wb') as f: f.write(fig)
 
 
 def test_plot_pdf():
-    fig = do_plot('application/pdf')
+    fig = do_plot("application/pdf")
 
     if six.PY2:
-        assert fig.startswith('%PDF')
+        assert fig.startswith("%PDF")
     else:
-        assert fig.startswith(b'%PDF')
-    #with open('test.pdf', 'wb') as f: f.write(fig)
+        assert fig.startswith(b"%PDF")
+    # with open('test.pdf', 'wb') as f: f.write(fig)
+
 
 def test_plot_many_lines():
 
-    p = Plotter(prefix, 'user/scatter/1')
+    p = Plotter(prefix, "user/scatter/1")
     assert p.valid
 
-    data1 = p.dataformat.type(data=[
-        # temperature in C against icecream sales day-by-day
-        { 'x': 0, 'y': 0 },
-        { 'x': 1, 'y': 1 },
-        { 'x': 2, 'y': 2 },
-        { 'x': 3, 'y': 3 },
-        { 'x': 4, 'y': 4 },
-        { 'x': 5, 'y': 5 },
-        { 'x': 6, 'y': 6 },
-        { 'x': 7, 'y': 7 },
-        { 'x': 8, 'y': 8 },
-        { 'x': 9, 'y': 9 },
-        ])
-
-    data2 = p.dataformat.type(data=[
-        # temperature in C against icecream sales day-by-day
-        { 'x': 0, 'y': 1 },
-        { 'x': 1, 'y': 3 },
-        { 'x': 2, 'y': 5 },
-        { 'x': 3, 'y': 7 },
-        { 'x': 4, 'y': 9 },
-        { 'x': 5, 'y': 11 },
-        { 'x': 6, 'y': 13 },
-        { 'x': 7, 'y': 15 },
-        { 'x': 8, 'y': 17 },
-        { 'x': 9, 'y': 19 },
-        ])
+    data1 = p.dataformat.type(
+        data=[
+            # temperature in C against icecream sales day-by-day
+            {"x": 0, "y": 0},
+            {"x": 1, "y": 1},
+            {"x": 2, "y": 2},
+            {"x": 3, "y": 3},
+            {"x": 4, "y": 4},
+            {"x": 5, "y": 5},
+            {"x": 6, "y": 6},
+            {"x": 7, "y": 7},
+            {"x": 8, "y": 8},
+            {"x": 9, "y": 9},
+        ]
+    )
+
+    data2 = p.dataformat.type(
+        data=[
+            # temperature in C against icecream sales day-by-day
+            {"x": 0, "y": 1},
+            {"x": 1, "y": 3},
+            {"x": 2, "y": 5},
+            {"x": 3, "y": 7},
+            {"x": 4, "y": 9},
+            {"x": 5, "y": 11},
+            {"x": 6, "y": 13},
+            {"x": 7, "y": 15},
+            {"x": 8, "y": 17},
+            {"x": 9, "y": 19},
+        ]
+    )
 
     runnable = p.runner()
     assert runnable.ready is False
-    runnable.setup({
-        'title': 'Test plot',
-        'grid': True,
-        'legend': '&'.join(['Dashed red line with cross', 'Blue circles with line']),
-        'line_attributes': '&'.join(['r+--', 'bo-']),
-        'mimetype': 'image/png',
-        })
+    runnable.setup(
+        {
+            "title": "Test plot",
+            "grid": True,
+            "legend": "&".join(
+                ["Dashed red line with cross", "Blue circles with line"]
+            ),
+            "line_attributes": "&".join(["r+--", "bo-"]),
+            "mimetype": "image/png",
+        }
+    )
     assert runnable.ready
 
     fig = runnable.process([data1, data2])
-    nose.tools.eq_(imghdr.what('test.png', fig), 'png')
-    #with open('test2.png', 'wb') as f: f.write(fig)
+    nose.tools.eq_(imghdr.what("test.png", fig), "png")
+    # with open('test2.png', 'wb') as f: f.write(fig)
diff --git a/beat/core/test/test_schema.py b/beat/core/test/test_schema.py
index 1f43f204dbe0c440d05e51a467f8458ca0aff42d..8f76da7fa56eb55ba5dc84fcc78dc75be58d7ebe 100644
--- a/beat/core/test/test_schema.py
+++ b/beat/core/test/test_schema.py
@@ -1,53 +1,67 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
 
 
 from ..schema import load_schema
 
+
 def test_common():
 
     load_schema("common")
 
+
 def test_dataformat():
 
     load_schema("dataformat")
 
+
 def test_algorithm():
 
     load_schema("algorithm")
 
+
 def test_database():
 
     load_schema("database")
 
+
 def test_toolchain():
 
     load_schema("toolchain")
 
+
 def test_experiment():
 
     load_schema("experiment")
diff --git a/beat/core/test/test_stats.py b/beat/core/test/test_stats.py
index a1b5de07521bbe4219d42cba0fac3468478e4537..616dd3d3eaac3209535ae1bdfe6f7a31ce645a74 100644
--- a/beat/core/test/test_stats.py
+++ b/beat/core/test/test_stats.py
@@ -1,39 +1,48 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
 
 
 import nose.tools
 from ..stats import Statistics
 
+
 def test_prototype():
-    obj = Statistics() #creates from prototype
+    obj = Statistics()  # creates from prototype
 
-    assert 'cpu' in obj._data
-    assert 'memory' in obj._data
-    assert 'data' in obj._data
-    assert 'files' in obj.data
-    nose.tools.eq_(len(obj.data['files']), 0)
+    assert "cpu" in obj._data
+    assert "memory" in obj._data
+    assert "data" in obj._data
+    assert "files" in obj.data
+    nose.tools.eq_(len(obj.data["files"]), 0)
diff --git a/beat/core/test/test_toolchain_invalid.py b/beat/core/test/test_toolchain_invalid.py
index f6ce3f68ca7bc737fe224af6e7e571626dde16c3..63ee6846109e237d746b62509d2b3e011195a599 100644
--- a/beat/core/test/test_toolchain_invalid.py
+++ b/beat/core/test/test_toolchain_invalid.py
@@ -1,29 +1,37 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
 
 
 import nose.tools
@@ -31,113 +39,149 @@ from ..toolchain import Toolchain
 
 from . import prefix
 
+
 def count_errors(l, e):
     """Makes sure a given string is present in one of the errors"""
     return sum([int(k.find(e) != -1) for k in l])
 
+
 def test_load_default():
 
     toolchain = Toolchain(prefix, data=None)
-    assert toolchain.valid, '\n  * %s' % '\n  * '.join(toolchain.errors)
+    assert toolchain.valid, "\n  * %s" % "\n  * ".join(toolchain.errors)
+
 
 def test_load_unknown_toolchain():
 
-    toolchain = Toolchain(prefix, 'user/unknown/1')
+    toolchain = Toolchain(prefix, "user/unknown/1")
     assert toolchain.valid is False
-    nose.tools.eq_(count_errors(toolchain.errors, 'file not found'), 1)
+    nose.tools.eq_(count_errors(toolchain.errors, "file not found"), 1)
+
 
 def test_load_invalid_toolchain():
 
-    toolchain = Toolchain(prefix, 'user/invalid/1')
+    toolchain = Toolchain(prefix, "user/invalid/1")
     assert toolchain.valid is False
-    nose.tools.eq_(count_errors(toolchain.errors, 'invalid JSON'), 1)
+    nose.tools.eq_(count_errors(toolchain.errors, "invalid JSON"), 1)
+
 
 def test_load_toolchain_without_blocks_list():
 
-    toolchain = Toolchain(prefix, 'user/missing_blocks/1')
+    toolchain = Toolchain(prefix, "user/missing_blocks/1")
     assert toolchain.valid is False
     nose.tools.eq_(count_errors(toolchain.errors, "'blocks' is a required property"), 1)
 
+
 def test_load_toolchain_with_missing_block_name():
 
-    toolchain = Toolchain(prefix, 'user/missing_block_name/1')
+    toolchain = Toolchain(prefix, "user/missing_block_name/1")
     assert toolchain.valid is False
     nose.tools.eq_(count_errors(toolchain.errors, "'name' is a required property"), 1)
 
+
 def test_load_toolchain_with_missing_block_inputs():
 
-    toolchain = Toolchain(prefix, 'user/missing_block_inputs/1')
+    toolchain = Toolchain(prefix, "user/missing_block_inputs/1")
     assert toolchain.valid is False
     nose.tools.eq_(count_errors(toolchain.errors, "'inputs' is a required property"), 1)
 
+
 def test_load_toolchain_with_missing_block_outputs():
 
-    toolchain = Toolchain(prefix, 'user/missing_block_outputs/1')
+    toolchain = Toolchain(prefix, "user/missing_block_outputs/1")
     assert toolchain.valid is False
-    nose.tools.eq_(count_errors(toolchain.errors, "'outputs' is a required property"), 1)
+    nose.tools.eq_(
+        count_errors(toolchain.errors, "'outputs' is a required property"), 1
+    )
+
 
 def test_load_toolchain_without_datasets_list():
 
-    toolchain = Toolchain(prefix, 'user/missing_datasets/1')
+    toolchain = Toolchain(prefix, "user/missing_datasets/1")
     assert toolchain.valid is False
-    nose.tools.eq_(count_errors(toolchain.errors, "'datasets' is a required property"), 1)
+    nose.tools.eq_(
+        count_errors(toolchain.errors, "'datasets' is a required property"), 1
+    )
+
 
 def test_load_toolchain_with_missing_dataset_name():
 
-    toolchain = Toolchain(prefix, 'user/missing_dataset_name/1')
+    toolchain = Toolchain(prefix, "user/missing_dataset_name/1")
     assert toolchain.valid is False
     nose.tools.eq_(count_errors(toolchain.errors, "'name' is a required property"), 1)
 
+
 def test_load_toolchain_with_missing_dataset_outputs():
 
-    toolchain = Toolchain(prefix, 'user/missing_dataset_outputs/1')
+    toolchain = Toolchain(prefix, "user/missing_dataset_outputs/1")
     assert toolchain.valid is False
-    nose.tools.eq_(count_errors(toolchain.errors, "'outputs' is a required property"), 1)
+    nose.tools.eq_(
+        count_errors(toolchain.errors, "'outputs' is a required property"), 1
+    )
+
 
 def test_load_toolchain_with_missing_connection_from():
 
-    toolchain = Toolchain(prefix, 'user/missing_connection_from/1')
+    toolchain = Toolchain(prefix, "user/missing_connection_from/1")
     assert toolchain.valid is False
     nose.tools.eq_(count_errors(toolchain.errors, "'from' is a required property"), 1)
 
+
 def test_load_toolchain_with_missing_connection_to():
 
-    toolchain = Toolchain(prefix, 'user/missing_connection_to/1')
+    toolchain = Toolchain(prefix, "user/missing_connection_to/1")
     assert toolchain.valid is False
     nose.tools.eq_(count_errors(toolchain.errors, "'to' is a required property"), 1)
 
+
 def test_load_toolchain_referencing_unknown_block_input():
 
-    toolchain = Toolchain(prefix, 'user/unknown_block_input/1')
+    toolchain = Toolchain(prefix, "user/unknown_block_input/1")
     assert toolchain.valid is False
-    nose.tools.eq_(count_errors(toolchain.errors, "invalid input endpoint 'addition.c'"), 1)
+    nose.tools.eq_(
+        count_errors(toolchain.errors, "invalid input endpoint 'addition.c'"), 1
+    )
+
 
 def test_load_toolchain_referencing_unknown_dataset_output():
 
-    toolchain = Toolchain(prefix, 'user/unknown_dataset_output/1')
+    toolchain = Toolchain(prefix, "user/unknown_dataset_output/1")
     assert toolchain.valid is False
-    nose.tools.eq_(count_errors(toolchain.errors, "invalid output endpoint 'integers.timestamps'"), 1)
+    nose.tools.eq_(
+        count_errors(toolchain.errors, "invalid output endpoint 'integers.timestamps'"),
+        1,
+    )
+
 
 def test_load_toolchain_referencing_unknown_block_output():
 
-    toolchain = Toolchain(prefix, 'user/unknown_block_output/1')
+    toolchain = Toolchain(prefix, "user/unknown_block_output/1")
     assert toolchain.valid is False
-    nose.tools.eq_(count_errors(toolchain.errors, "invalid output endpoint 'addition.unknown'"), 1)
+    nose.tools.eq_(
+        count_errors(toolchain.errors, "invalid output endpoint 'addition.unknown'"), 1
+    )
+
 
 def test_load_toolchain_referencing_unknown_analyzer_input():
 
-    toolchain = Toolchain(prefix, 'user/unknown_analyzer_input/1')
+    toolchain = Toolchain(prefix, "user/unknown_analyzer_input/1")
     assert toolchain.valid is False
-    nose.tools.eq_(count_errors(toolchain.errors, "invalid input endpoint 'analysis.unknown'"), 1)
+    nose.tools.eq_(
+        count_errors(toolchain.errors, "invalid input endpoint 'analysis.unknown'"), 1
+    )
+
 
 def test_load_toolchain_unconnected_input():
 
-    toolchain = Toolchain(prefix, 'user/unconnected_input/1')
+    toolchain = Toolchain(prefix, "user/unconnected_input/1")
     assert toolchain.valid is False
-    nose.tools.eq_(count_errors(toolchain.errors, "input(s) `addition.b' remain unconnected"), 1)
+    nose.tools.eq_(
+        count_errors(toolchain.errors, "input(s) `addition.b' remain unconnected"), 1
+    )
+
 
 def test_load_toolchain_double_connected_input():
 
-    toolchain = Toolchain(prefix, 'user/double_connected_input/1')
+    toolchain = Toolchain(prefix, "user/double_connected_input/1")
     assert toolchain.valid is False
     nose.tools.eq_(count_errors(toolchain.errors, "ending on the same input as"), 1)
diff --git a/beat/core/test/test_toolchain_processing_order.py b/beat/core/test/test_toolchain_processing_order.py
index eb5e3a9b65226987affb7f499ffafe3767edefc5..292c064ddd97d785931c3733638b44f3a10ea485 100644
--- a/beat/core/test/test_toolchain_processing_order.py
+++ b/beat/core/test/test_toolchain_processing_order.py
@@ -1,29 +1,37 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
 
 
 import nose.tools
@@ -31,35 +39,40 @@ from ..toolchain import Toolchain
 
 from . import prefix
 
+
 def test_integers_addition_1():
 
-    toolchain = Toolchain(prefix, 'user/integers_addition/1')
+    toolchain = Toolchain(prefix, "user/integers_addition/1")
     assert toolchain.valid
 
     order = toolchain.execution_order()
-    nose.tools.eq_(list(order.keys()), ['addition', 'analysis'])
-    nose.tools.eq_(order['addition'], set())
-    nose.tools.eq_(order['analysis'], set(['addition']))
+    nose.tools.eq_(list(order.keys()), ["addition", "analysis"])
+    nose.tools.eq_(order["addition"], set())
+    nose.tools.eq_(order["analysis"], set(["addition"]))
+
 
 def test_integers_addition_2():
 
-    toolchain = Toolchain(prefix, 'user/integers_addition/2')
+    toolchain = Toolchain(prefix, "user/integers_addition/2")
     assert toolchain.valid
 
     order = toolchain.execution_order()
-    nose.tools.eq_(list(order.keys()), ['addition1', 'addition2', 'analysis'])
-    nose.tools.eq_(order['addition1'], set())
-    nose.tools.eq_(order['addition2'], set(['addition1']))
-    nose.tools.eq_(order['analysis'], set(['addition2']))
+    nose.tools.eq_(list(order.keys()), ["addition1", "addition2", "analysis"])
+    nose.tools.eq_(order["addition1"], set())
+    nose.tools.eq_(order["addition2"], set(["addition1"]))
+    nose.tools.eq_(order["analysis"], set(["addition2"]))
+
 
 def test_integers_addition_3():
 
-    toolchain = Toolchain(prefix, 'user/integers_addition/3')
+    toolchain = Toolchain(prefix, "user/integers_addition/3")
     assert toolchain.valid
 
     order = toolchain.execution_order()
-    nose.tools.eq_(list(order.keys()), ['addition1', 'addition2', 'addition3', 'analysis'])
-    nose.tools.eq_(order['addition1'], set())
-    nose.tools.eq_(order['addition2'], set())
-    nose.tools.eq_(order['addition3'], set(['addition1', 'addition2']))
-    nose.tools.eq_(order['analysis'], set(['addition3']))
+    nose.tools.eq_(
+        list(order.keys()), ["addition1", "addition2", "addition3", "analysis"]
+    )
+    nose.tools.eq_(order["addition1"], set())
+    nose.tools.eq_(order["addition2"], set())
+    nose.tools.eq_(order["addition3"], set(["addition1", "addition2"]))
+    nose.tools.eq_(order["analysis"], set(["addition3"]))
diff --git a/beat/core/test/test_worker.py b/beat/core/test/test_worker.py
index 7ce676e70216d0d4e8526f6d60ab4ac8e1102986..720eec2864e3c8459e538319e078de06e0f18df8 100644
--- a/beat/core/test/test_worker.py
+++ b/beat/core/test/test_worker.py
@@ -1,29 +1,37 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2017 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
 
 
 # Tests for experiment execution
@@ -31,11 +39,13 @@
 import os
 
 import logging
+
 logger = logging.getLogger(__name__)
 
 import unittest
 import simplejson
 import multiprocessing
+
 try:
     import Queue
 except ImportError:
@@ -50,113 +60,102 @@ from ..utils import find_free_port
 
 from . import prefix, tmp_prefix
 
-#----------------------------------------------------------
+# ----------------------------------------------------------
 
 
-WORKER1 = b'worker1'
-WORKER2 = b'worker2'
+WORKER1 = b"worker1"
+WORKER2 = b"worker2"
 PORT = find_free_port()
 
 
-#----------------------------------------------------------
+# ----------------------------------------------------------
 
 
 CONFIGURATION1 = {
-    'queue': 'queue',
-    'inputs': {
-        'in': {
-            'set': 'double',
-            'protocol': 'double',
-            'database': 'integers_db/1',
-            'output': 'a',
-            'path': 'ec/89/e5/6e161d2cb012ef6ac8acf59bf453a6328766f90dc9baba9eb14ea23c55.db',
-            'endpoint': 'a',
-            'hash': 'ec89e56e161d2cb012ef6ac8acf59bf453a6328766f90dc9baba9eb14ea23c55',
-            'channel': 'integers'
+    "queue": "queue",
+    "inputs": {
+        "in": {
+            "set": "double",
+            "protocol": "double",
+            "database": "integers_db/1",
+            "output": "a",
+            "path": "ec/89/e5/6e161d2cb012ef6ac8acf59bf453a6328766f90dc9baba9eb14ea23c55.db",
+            "endpoint": "a",
+            "hash": "ec89e56e161d2cb012ef6ac8acf59bf453a6328766f90dc9baba9eb14ea23c55",
+            "channel": "integers",
         }
     },
-    'algorithm': 'legacy/echo/1',
-    'parameters': {},
-    'environment': {
-        'name': 'Python 2.7',
-        'version': '1.3.0'
-    },
-    'outputs': {
-        'out': {
-            'path': '20/61/b6/2df3c3bedd5366f4a625c5d87ffbf5a26007c46c456e9abf21b46c6681',
-            'endpoint': 'out',
-            'hash': '2061b62df3c3bedd5366f4a625c5d87ffbf5a26007c46c456e9abf21b46c6681',
-            'channel': 'integers'
+    "algorithm": "legacy/echo/1",
+    "parameters": {},
+    "environment": {"name": "Python 2.7", "version": "1.3.0"},
+    "outputs": {
+        "out": {
+            "path": "20/61/b6/2df3c3bedd5366f4a625c5d87ffbf5a26007c46c456e9abf21b46c6681",
+            "endpoint": "out",
+            "hash": "2061b62df3c3bedd5366f4a625c5d87ffbf5a26007c46c456e9abf21b46c6681",
+            "channel": "integers",
         }
     },
-    'nb_slots': 1,
-    'channel': 'integers'
+    "nb_slots": 1,
+    "channel": "integers",
 }
 
 
-#----------------------------------------------------------
+# ----------------------------------------------------------
 
 
 CONFIGURATION2 = {
-    'queue': 'queue',
-    'inputs': {
-        'in': {
-            'set': 'double',
-            'protocol': 'double',
-            'database': 'integers_db/1',
-            'output': 'a',
-            'path': 'ec/89/e5/6e161d2cb012ef6ac8acf59bf453a6328766f90dc9baba9eb14ea23c55.db',
-            'endpoint': 'a',
-            'hash': 'ec89e56e161d2cb012ef6ac8acf59bf453a6328766f90dc9baba9eb14ea23c55',
-            'channel': 'integers'
+    "queue": "queue",
+    "inputs": {
+        "in": {
+            "set": "double",
+            "protocol": "double",
+            "database": "integers_db/1",
+            "output": "a",
+            "path": "ec/89/e5/6e161d2cb012ef6ac8acf59bf453a6328766f90dc9baba9eb14ea23c55.db",
+            "endpoint": "a",
+            "hash": "ec89e56e161d2cb012ef6ac8acf59bf453a6328766f90dc9baba9eb14ea23c55",
+            "channel": "integers",
         }
     },
-    'algorithm': 'legacy/echo/1',
-    'parameters': {},
-    'environment': {
-        'name': 'Python 2.7',
-        'version': '1.3.0'
-    },
-    'outputs': {
-        'out': {
-            'path': '40/61/b6/2df3c3bedd5366f4a625c5d87ffbf5a26007c46c456e9abf21b46c6681',
-            'endpoint': 'out',
-            'hash': '4061b62df3c3bedd5366f4a625c5d87ffbf5a26007c46c456e9abf21b46c6681',
-            'channel': 'integers'
+    "algorithm": "legacy/echo/1",
+    "parameters": {},
+    "environment": {"name": "Python 2.7", "version": "1.3.0"},
+    "outputs": {
+        "out": {
+            "path": "40/61/b6/2df3c3bedd5366f4a625c5d87ffbf5a26007c46c456e9abf21b46c6681",
+            "endpoint": "out",
+            "hash": "4061b62df3c3bedd5366f4a625c5d87ffbf5a26007c46c456e9abf21b46c6681",
+            "channel": "integers",
         }
     },
-    'nb_slots': 1,
-    'channel': 'integers'
+    "nb_slots": 1,
+    "channel": "integers",
 }
 
 
-#----------------------------------------------------------
+# ----------------------------------------------------------
 
 
 class ControllerProcess(multiprocessing.Process):
-
     def __init__(self, queue):
         super(ControllerProcess, self).__init__()
 
         self.queue = queue
 
-
     def run(self):
-        self.queue.put('STARTED')
+        self.queue.put("STARTED")
 
         def onWorkerReady(name):
-            self.queue.put('READY %s' % name.decode())
+            self.queue.put("READY %s" % name.decode())
 
         def onWorkerGone(name):
-            self.queue.put('GONE %s' % name.decode())
+            self.queue.put("GONE %s" % name.decode())
 
         self.controller = WorkerController(
-            '127.0.0.1',
+            "127.0.0.1",
             port=PORT,
-            callbacks=dict(
-                onWorkerReady = onWorkerReady,
-                onWorkerGone = onWorkerGone,
-            )
+            callbacks=dict(onWorkerReady=onWorkerReady, onWorkerGone=onWorkerGone),
         )
 
         while True:
@@ -164,7 +163,7 @@ class ControllerProcess(multiprocessing.Process):
 
             try:
                 command = self.queue.get_nowait()
-                if command == 'STOP':
+                if command == "STOP":
                     break
             except Queue.Empty:
                 pass
@@ -172,44 +171,38 @@ class ControllerProcess(multiprocessing.Process):
         self.controller.destroy()
 
 
-#----------------------------------------------------------
+# ----------------------------------------------------------
 
 
 class WorkerProcess(multiprocessing.Process):
-
     def __init__(self, queue, arguments):
         super(WorkerProcess, self).__init__()
 
         self.queue = queue
         self.arguments = arguments
 
-
     def run(self):
-        self.queue.put('STARTED')
+        self.queue.put("STARTED")
         worker.main(self.arguments)
 
 
-#----------------------------------------------------------
+# ----------------------------------------------------------
 
 
 class TestWorkerBase(unittest.TestCase):
-
-    def __init__(self, methodName='runTest'):
+    def __init__(self, methodName="runTest"):
         super(TestWorkerBase, self).__init__(methodName)
         self.controller = None
         self.connected_workers = []
         self.worker_processes = {}
         self.docker = False
 
-
     def setUp(self):
         self.shutdown_everything()  # In case another test failed badly during its setUp()
 
-
     def tearDown(self):
         self.shutdown_everything()
 
-
     def shutdown_everything(self):
         for name in list(self.worker_processes.keys()):
             self.stop_worker(name)
@@ -219,7 +212,6 @@ class TestWorkerBase(unittest.TestCase):
 
         self.stop_controller()
 
-
     def start_controller(self, port=None):
         self.connected_workers = []
 
@@ -230,34 +222,29 @@ class TestWorkerBase(unittest.TestCase):
             self.connected_workers.remove(name)
 
         self.controller = WorkerController(
-            '127.0.0.1',
+            "127.0.0.1",
             port=port,
-            callbacks=dict(
-                onWorkerReady = onWorkerReady,
-                onWorkerGone = onWorkerGone,
-            )
+            callbacks=dict(onWorkerReady=onWorkerReady, onWorkerGone=onWorkerGone),
         )
 
         self.controller.process(100)
 
-
     def stop_controller(self):
         if self.controller is not None:
             self.controller.destroy()
             self.controller = None
 
-
     def start_worker(self, name, address=None):
         args = [
-          '--prefix=%s' % prefix,
-          '--cache=%s' % tmp_prefix,
-          '--name=%s' % name.decode(),
-          # '-vv',
-          self.controller.address if address is None else address,
+            "--prefix=%s" % prefix,
+            "--cache=%s" % tmp_prefix,
+            "--name=%s" % name.decode(),
+            # '-vv',
+            self.controller.address if address is None else address,
         ]
 
         if self.docker:
-            args.insert(3, '--docker')
+            args.insert(3, "--docker")
 
         worker_process = WorkerProcess(multiprocessing.Queue(), args)
         worker_process.start()
@@ -266,14 +253,12 @@ class TestWorkerBase(unittest.TestCase):
 
         self.worker_processes[name] = worker_process
 
-
     def stop_worker(self, name):
         if name in self.worker_processes:
             self.worker_processes[name].terminate()
             self.worker_processes[name].join()
             del self.worker_processes[name]
 
-
     def wait_for_worker_connection(self, name, timeout=10):
         start = time()
         while name not in self.connected_workers:
@@ -282,7 +267,6 @@ class TestWorkerBase(unittest.TestCase):
 
         self.assertTrue(name in self.controller.workers)
 
-
     def wait_for_worker_disconnection(self, name):
         start = time()
         while name in self.connected_workers:
@@ -291,19 +275,17 @@ class TestWorkerBase(unittest.TestCase):
 
         self.assertTrue(name not in self.controller.workers)
 
-
     def prepare_databases(self, configuration):
-        for _, input_cfg in configuration['inputs'].items():
-            database = Database(prefix, input_cfg['database'])
-            view = database.view(input_cfg['protocol'], input_cfg['set'])
-            view.index(os.path.join(tmp_prefix, input_cfg['path']))
+        for _, input_cfg in configuration["inputs"].items():
+            database = Database(prefix, input_cfg["database"])
+            view = database.view(input_cfg["protocol"], input_cfg["set"])
+            view.index(os.path.join(tmp_prefix, input_cfg["path"]))
 
 
-#----------------------------------------------------------
+# ----------------------------------------------------------
 
 
 class TestConnection(TestWorkerBase):
-
     def test_worker_connection(self):
         self.start_controller()
 
@@ -317,7 +299,6 @@ class TestConnection(TestWorkerBase):
         self.assertEqual(len(self.connected_workers), 1)
         self.assertEqual(len(self.controller.workers), 1)
 
-
     def test_worker_disconnection(self):
         self.start_controller()
         self.start_worker(WORKER1)
@@ -330,7 +311,6 @@ class TestConnection(TestWorkerBase):
 
         self.wait_for_worker_disconnection(WORKER1)
 
-
     def test_two_workers_connection(self):
         self.start_controller()
 
@@ -346,29 +326,27 @@ class TestConnection(TestWorkerBase):
         self.assertEqual(len(self.connected_workers), 2)
         self.assertEqual(len(self.controller.workers), 2)
 
-
     def test_scheduler_last(self):
-        self.start_worker(WORKER1, address='tcp://127.0.0.1:%i' % PORT)
+        self.start_worker(WORKER1, address="tcp://127.0.0.1:%i" % PORT)
         sleep(1)
 
         self.start_controller(port=PORT)
 
         self.wait_for_worker_connection(WORKER1)
 
-
     def test_scheduler_shutdown(self):
         controller = ControllerProcess(multiprocessing.Queue())
         controller.start()
 
         message = controller.queue.get()
-        self.assertEqual(message, 'STARTED')
+        self.assertEqual(message, "STARTED")
 
-        self.start_worker(WORKER1, 'tcp://127.0.0.1:%i' % PORT)
+        self.start_worker(WORKER1, "tcp://127.0.0.1:%i" % PORT)
 
         message = controller.queue.get()
-        self.assertEqual(message, 'READY ' + WORKER1.decode())
+        self.assertEqual(message, "READY " + WORKER1.decode())
 
-        controller.queue.put('STOP')
+        controller.queue.put("STOP")
 
         sleep(1)
 
@@ -376,20 +354,18 @@ class TestConnection(TestWorkerBase):
         controller.start()
 
         message = controller.queue.get()
-        self.assertEqual(message, 'STARTED')
+        self.assertEqual(message, "STARTED")
 
         message = controller.queue.get()
-        self.assertEqual(message, 'READY ' + WORKER1.decode())
+        self.assertEqual(message, "READY " + WORKER1.decode())
 
-        controller.queue.put('STOP')
+        controller.queue.put("STOP")
 
 
-#----------------------------------------------------------
+# ----------------------------------------------------------
 
 
 class TestOneWorker(TestWorkerBase):
-
-
     def setUp(self):
         super(TestOneWorker, self).setUp()
 
@@ -400,7 +376,6 @@ class TestOneWorker(TestWorkerBase):
 
         self.prepare_databases(CONFIGURATION1)
 
-
     def _wait(self, max=200):
         message = None
         nb = 0
@@ -414,7 +389,6 @@ class TestOneWorker(TestWorkerBase):
 
         return message
 
-
     def _check_done(self, message, expected_worker, expected_job_id):
         self.assertTrue(message is not None)
 
@@ -426,8 +400,7 @@ class TestOneWorker(TestWorkerBase):
 
         result = simplejson.loads(data[0])
 
-        self.assertEqual(result['status'], 0)
-
+        self.assertEqual(result["status"], 0)
 
     def test_success(self):
         self.controller.execute(WORKER1, 1, CONFIGURATION1)
@@ -436,10 +409,9 @@ class TestOneWorker(TestWorkerBase):
 
         self._check_done(message, WORKER1, 1)
 
-
     def test_processing_error(self):
         config = dict(CONFIGURATION1)
-        config['algorithm'] = 'legacy/process_crash/1'
+        config["algorithm"] = "legacy/process_crash/1"
 
         self.controller.execute(WORKER1, 1, config)
 
@@ -453,13 +425,12 @@ class TestOneWorker(TestWorkerBase):
 
         result = simplejson.loads(data[0])
 
-        self.assertEqual(result['status'], 1)
-        self.assertTrue('a = b' in result['user_error'])
-
+        self.assertEqual(result["status"], 1)
+        self.assertTrue("a = b" in result["user_error"])
 
     def test_error_unknown_algorithm(self):
         config = dict(CONFIGURATION1)
-        config['algorithm'] = 'user/unknown/1'
+        config["algorithm"] = "user/unknown/1"
 
         self.controller.execute(WORKER1, 1, config)
 
@@ -472,10 +443,9 @@ class TestOneWorker(TestWorkerBase):
         self.assertEqual(job_id, 1)
         self.assertTrue(len(data) > 0)
 
-
     def test_error_syntax_error(self):
         config = dict(CONFIGURATION1)
-        config['algorithm'] = 'legacy/syntax_error/1'
+        config["algorithm"] = "legacy/syntax_error/1"
 
         self.controller.execute(WORKER1, 1, config)
 
@@ -488,10 +458,9 @@ class TestOneWorker(TestWorkerBase):
         self.assertEqual(job_id, 1)
         self.assertTrue(len(data) > 0)
 
-
     def test_multiple_jobs(self):
         config = dict(CONFIGURATION1)
-        config['algorithm'] = 'user/integers_echo_slow/1'
+        config["algorithm"] = "user/integers_echo_slow/1"
 
         self.controller.execute(WORKER1, 1, CONFIGURATION1)
         self.controller.execute(WORKER1, 2, config)
@@ -502,7 +471,6 @@ class TestOneWorker(TestWorkerBase):
         message = self._wait()
         self._check_done(message, WORKER1, 2)
 
-
     def test_reuse(self):
         self.controller.execute(WORKER1, 1, CONFIGURATION1)
         message = self._wait()
@@ -512,10 +480,9 @@ class TestOneWorker(TestWorkerBase):
         message = self._wait()
         self._check_done(message, WORKER1, 2)
 
-
     def test_cancel(self):
         config = dict(CONFIGURATION1)
-        config['algorithm'] = 'user/integers_echo_slow/1'
+        config["algorithm"] = "user/integers_echo_slow/1"
 
         self.controller.execute(WORKER1, 1, config)
         self.controller.cancel(WORKER1, 1)
@@ -529,7 +496,6 @@ class TestOneWorker(TestWorkerBase):
         self.assertEqual(job_id, 1)
         self.assertEqual(len(data), 0)
 
-
     def test_error_cancel_unknown_job(self):
         self.controller.cancel(WORKER1, 1)
 
@@ -543,13 +509,12 @@ class TestOneWorker(TestWorkerBase):
         self.assertEqual(data[0].decode(), "Unknown job: 1")
 
 
-#----------------------------------------------------------
+# ----------------------------------------------------------
 
 
 class TestTwoWorkers(TestWorkerBase):
-
     def setUp(self):
-        self.tearDown()   # In case another test failed badly during its setUp()
+        self.tearDown()  # In case another test failed badly during its setUp()
 
         super(TestTwoWorkers, self).setUp()
 
@@ -559,7 +524,6 @@ class TestTwoWorkers(TestWorkerBase):
         self.wait_for_worker_connection(WORKER1)
         self.wait_for_worker_connection(WORKER2)
 
-
     def _test_success_one_worker(self, worker_name):
         self.controller.execute(worker_name, 1, CONFIGURATION1)
 
@@ -576,17 +540,14 @@ class TestTwoWorkers(TestWorkerBase):
 
         result = simplejson.loads(data[0])
 
-        self.assertEqual(result['status'], 0)
-
+        self.assertEqual(result["status"], 0)
 
     def test_success_worker1(self):
         self._test_success_one_worker(WORKER1)
 
-
     def test_success_worker2(self):
         self._test_success_one_worker(WORKER2)
 
-
     def test_success_both_workers(self):
         def _check(worker, status, job_id, data):
             self.assertEqual(status, WorkerController.DONE)
@@ -598,8 +559,7 @@ class TestTwoWorkers(TestWorkerBase):
                 self.assertEqual(job_id, 2)
 
             result = simplejson.loads(data[0])
-            self.assertEqual(result['status'], 0)
-
+            self.assertEqual(result["status"], 0)
 
         self.controller.execute(WORKER1, 1, CONFIGURATION1)
         self.controller.execute(WORKER2, 2, CONFIGURATION2)
diff --git a/beat/core/test/utils.py b/beat/core/test/utils.py
index 1f67df9773a72e22f79334b4574d447c8be53d63..e5b10040530d4c82ef9a71e7dfcf983bdea3db0b 100644
--- a/beat/core/test/utils.py
+++ b/beat/core/test/utils.py
@@ -1,32 +1,40 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
-
-
-'''Decorators for test units'''
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
+
+
+"""Decorators for test units"""
 
 import os
 import shutil
@@ -35,7 +43,7 @@ import nose
 import docker
 
 
-#----------------------------------------------------------
+# ----------------------------------------------------------
 
 
 DOCKER_TEST_IMAGES = {
@@ -43,7 +51,7 @@ DOCKER_TEST_IMAGES = {
     "docker.idiap.ch/beat/beat.env.db.examples": "1.4.0r4",
     "docker.idiap.ch/beat/beat.env.cxx": "2.0.0r1",
     "docker.idiap.ch/beat/beat.env.client": "2.0.0r1",
-    }
+}
 """Images used for docker-enabled tests within this and other BEAT packages
 """
 
@@ -57,6 +65,7 @@ def pull_docker_test_images():
     """
 
     import docker
+
     client = docker.from_env()
 
     for image, tag in DOCKER_TEST_IMAGES.items():
@@ -64,21 +73,21 @@ def pull_docker_test_images():
 
         for installed_image in client.images.list():
             for installed_tag in installed_image.tags:
-                if installed_tag == ('%s:%s' % (image, tag)):
+                if installed_tag == ("%s:%s" % (image, tag)):
                     has_image = True
 
-        if not has_image:  #must pull (network connection required)
+        if not has_image:  # must pull (network connection required)
 
-            token = os.environ.get('CI_BUILD_TOKEN')
+            token = os.environ.get("CI_BUILD_TOKEN")
             args = (image, tag)
             kwargs = {}
-            if token is not None:  #running on CI, setup
-                auth_config = dict(username='gitlab-ci-token', password=token)
-                kwargs['auth_config'] = auth_config
+            if token is not None:  # running on CI, setup
+                auth_config = dict(username="gitlab-ci-token", password=token)
+                kwargs["auth_config"] = auth_config
             client.images.pull(*args, **kwargs)
 
 
-#----------------------------------------------------------
+# ----------------------------------------------------------
 
 
 def slow(t):
@@ -117,7 +126,7 @@ def slow(t):
     return t
 
 
-#----------------------------------------------------------
+# ----------------------------------------------------------
 
 
 def skipif(skip_condition, msg=None):
@@ -185,41 +194,38 @@ def skipif(skip_condition, msg=None):
     return skip_decorator
 
 
-#----------------------------------------------------------
+# ----------------------------------------------------------
 
 
 def cleanup():
 
     from . import prefix, tmp_prefix
 
-    cache_path = os.path.join(prefix, 'cache')
+    cache_path = os.path.join(prefix, "cache")
     if os.path.exists(cache_path):
         shutil.rmtree(cache_path)
 
-    beat_path = os.path.join(prefix, '.beat')
+    beat_path = os.path.join(prefix, ".beat")
     if os.path.exists(beat_path):
         shutil.rmtree(beat_path)
 
     if os.path.exists(tmp_prefix):
-        os.makedirs(tmp_prefix + '.new')
-        shutil.copymode(tmp_prefix, tmp_prefix + '.new')
+        os.makedirs(tmp_prefix + ".new")
+        shutil.copymode(tmp_prefix, tmp_prefix + ".new")
         shutil.rmtree(tmp_prefix)
-        shutil.move(tmp_prefix + '.new', tmp_prefix)
+        shutil.move(tmp_prefix + ".new", tmp_prefix)
 
 
-#----------------------------------------------------------
+# ----------------------------------------------------------
 
 
 def create_network(network_name):
     """ Create a docker network with the given name"""
 
-    ipam_pool = docker.types.IPAMPool(subnet='193.169.0.0/24',
-                                      gateway='193.169.0.254')
+    ipam_pool = docker.types.IPAMPool(subnet="193.169.0.0/24", gateway="193.169.0.254")
 
     ipam_config = docker.types.IPAMConfig(pool_configs=[ipam_pool])
 
     client = docker.from_env()
-    network = client.networks.create(network_name,
-                                     driver="bridge",
-                                     ipam=ipam_config)
+    network = client.networks.create(network_name, driver="bridge", ipam=ipam_config)
     return network
diff --git a/beat/core/toolchain.py b/beat/core/toolchain.py
index b84261806419e03e3c0d476a09e297e68061e6e8..34d8a73c12a31a75fef426d32ed3da7c81268066 100644
--- a/beat/core/toolchain.py
+++ b/beat/core/toolchain.py
@@ -1,29 +1,37 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
 
 
 """
@@ -56,14 +64,14 @@ class Storage(utils.Storage):
 
     def __init__(self, prefix, name):
 
-        if name.count('/') != 2:
+        if name.count("/") != 2:
             raise RuntimeError("invalid toolchain name: `%s'" % name)
 
-        self.username, self.name, self.version = name.split('/')
+        self.username, self.name, self.version = name.split("/")
         self.fullname = name
         self.prefix = prefix
 
-        path = utils.hashed_or_simple(self.prefix, 'toolchains', name, suffix='.json')
+        path = utils.hashed_or_simple(self.prefix, "toolchains", name, suffix=".json")
         path = path[:-5]
 
         super(Storage, self).__init__(path)
@@ -118,7 +126,7 @@ class Toolchain(object):
 
         if data is None:  # loads prototype and validates it
 
-            self.data, self.errors = prototypes.load('toolchain')
+            self.data, self.errors = prototypes.load("toolchain")
             assert not self.errors, "\n  * %s" % "\n  *".join(self.errors)
 
         else:
@@ -127,15 +135,18 @@ class Toolchain(object):
                 self._name = data
                 self.storage = Storage(self.prefix, self._name)
                 if not self.storage.exists():
-                    self.errors.append('Toolchain declaration file not found: %s' % data)
+                    self.errors.append(
+                        "Toolchain declaration file not found: %s" % data
+                    )
                     return
 
                 data = self.storage.json.path
 
             # this runs basic validation, including JSON loading if required
-            self.data, self.errors = schema.validate('toolchain', data)
+            self.data, self.errors = schema.validate("toolchain", data)
 
-        if self.errors: return  # don't proceed with the rest of validation
+        if self.errors:
+            return  # don't proceed with the rest of validation
 
         # these will be filled by the following methods
         channels = []
@@ -160,85 +171,99 @@ class Toolchain(object):
     def _check_datasets(self, channels, outputs, names):
         """Checks all datasets"""
 
-        for i, dataset in enumerate(self.data['datasets']):
+        for i, dataset in enumerate(self.data["datasets"]):
 
-            if dataset['name'] in names:
-                self.errors.append("/datasets/[#%d]/name: duplicated name, first " \
-                        "occurance of '%s' happened at '%s'" % \
-                        (i, dataset['name'], names[dataset['name']]))
+            if dataset["name"] in names:
+                self.errors.append(
+                    "/datasets/[#%d]/name: duplicated name, first "
+                    "occurance of '%s' happened at '%s'"
+                    % (i, dataset["name"], names[dataset["name"]])
+                )
             else:
-                names[dataset['name']] = "/datasets/%s[#%d]" % (dataset['name'], i)
-                channels.append(dataset['name'])
+                names[dataset["name"]] = "/datasets/%s[#%d]" % (dataset["name"], i)
+                channels.append(dataset["name"])
 
-            outputs += ['%s.%s' % (dataset['name'], k) for k in dataset['outputs']]
+            outputs += ["%s.%s" % (dataset["name"], k) for k in dataset["outputs"]]
 
         return channels, outputs, names
 
     def _check_blocks(self, channels, inputs, outputs, names):
         """Checks all blocks"""
 
-        for i, block in enumerate(self.data['blocks']):
+        for i, block in enumerate(self.data["blocks"]):
 
-            if block['name'] in names:
-                self.errors.append("/blocks/[#%d]/name: duplicated name, first " \
-                        "occurance of '%s' happened at '%s'" % \
-                        (i, block['name'], names[block['name']]))
+            if block["name"] in names:
+                self.errors.append(
+                    "/blocks/[#%d]/name: duplicated name, first "
+                    "occurance of '%s' happened at '%s'"
+                    % (i, block["name"], names[block["name"]])
+                )
             else:
-                names[block['name']] = "/blocks/%s[#%d]" % (block['name'], i)
+                names[block["name"]] = "/blocks/%s[#%d]" % (block["name"], i)
 
-            inputs += ['%s.%s' % (block['name'], k) for k in block['inputs']]
-            outputs += ['%s.%s' % (block['name'], k) for k in block['outputs']]
+            inputs += ["%s.%s" % (block["name"], k) for k in block["inputs"]]
+            outputs += ["%s.%s" % (block["name"], k) for k in block["outputs"]]
 
-            if block['synchronized_channel'] not in channels:
-                self.errors.append("/blocks/%s[#%d]/synchronized_channel: invalid " \
-                        "synchronization channel '%s'" % \
-                        (block['name'], i, block['synchronized_channel']))
+            if block["synchronized_channel"] not in channels:
+                self.errors.append(
+                    "/blocks/%s[#%d]/synchronized_channel: invalid "
+                    "synchronization channel '%s'"
+                    % (block["name"], i, block["synchronized_channel"])
+                )
 
         return channels, inputs, outputs, names
 
     def _check_loops(self, channels, inputs, names):
         """ Check all loops"""
 
-        if 'loops' not in self.data:
+        if "loops" not in self.data:
             return channels, inputs, names
 
-        for i, loop in enumerate(self.data['loops']):
-            loop_name = loop['name']
+        for i, loop in enumerate(self.data["loops"]):
+            loop_name = loop["name"]
 
             if loop_name in names:
-                self.errors.append("/loops/[#%d]/name: duplicated name, first " \
-                        "occurance of '%s' happened at '%s'" % \
-                        (i, loop_name, names[loop_name]))
+                self.errors.append(
+                    "/loops/[#%d]/name: duplicated name, first "
+                    "occurance of '%s' happened at '%s'"
+                    % (i, loop_name, names[loop_name])
+                )
             else:
                 names[loop_name] = "/loops/%s[#%d]" % (loop_name, i)
 
-            inputs += ['%s.%s' % (loop_name, k) for k in loop['inputs']]
+            inputs += ["%s.%s" % (loop_name, k) for k in loop["inputs"]]
 
-            if loop['synchronized_channel'] not in channels:
-                self.errors.append("/loopss/%s[#%d]/synchronized_channel: " \
-                        "invalid synchronization channel '%s'" % \
-                        (loop_name, i, loop['synchronized_channel']))
+            if loop["synchronized_channel"] not in channels:
+                self.errors.append(
+                    "/loopss/%s[#%d]/synchronized_channel: "
+                    "invalid synchronization channel '%s'"
+                    % (loop_name, i, loop["synchronized_channel"])
+                )
 
         return channels, inputs, names
 
     def _check_analyzers(self, channels, inputs, names):
         """Checks all analyzers"""
 
-        for i, analyzer in enumerate(self.data['analyzers']):
+        for i, analyzer in enumerate(self.data["analyzers"]):
 
-            if analyzer['name'] in names:
-                self.errors.append("/analyzers/[#%d]/name: duplicated name, first " \
-                        "occurance of '%s' happened at '%s'" % \
-                        (i, analyzer['name'], names[analyzer['name']]))
+            if analyzer["name"] in names:
+                self.errors.append(
+                    "/analyzers/[#%d]/name: duplicated name, first "
+                    "occurance of '%s' happened at '%s'"
+                    % (i, analyzer["name"], names[analyzer["name"]])
+                )
             else:
-                names[analyzer['name']] = "/analyzers/%s[#%d]" % (analyzer['name'], i)
+                names[analyzer["name"]] = "/analyzers/%s[#%d]" % (analyzer["name"], i)
 
-            inputs += ['%s.%s' % (analyzer['name'], k) for k in analyzer['inputs']]
+            inputs += ["%s.%s" % (analyzer["name"], k) for k in analyzer["inputs"]]
 
-            if analyzer['synchronized_channel'] not in channels:
-                self.errors.append("/analyzers/%s[#%d]/synchronized_channel: " \
-                        "invalid synchronization channel '%s'" % \
-                        (analyzer['name'], i, analyzer['synchronized_channel']))
+            if analyzer["synchronized_channel"] not in channels:
+                self.errors.append(
+                    "/analyzers/%s[#%d]/synchronized_channel: "
+                    "invalid synchronization channel '%s'"
+                    % (analyzer["name"], i, analyzer["synchronized_channel"])
+                )
 
     def _check_connections(self, channels, inputs, outputs, connections):
         """Checks connection consistency"""
@@ -246,69 +271,88 @@ class Toolchain(object):
         input_endpoints = dict()
         unconnected_inputs = set(inputs)
 
-        for i, connection in enumerate(self.data['connections']):
+        for i, connection in enumerate(self.data["connections"]):
 
             # checks no 2 connections arrive at the same input
-            if connection['to'] in input_endpoints:
-                connected = input_endpoints[connection['to']]
-                self.errors.append("/connection/%s->%s[#%d]/: ending on the same "
-                        "input as /connection/%s->%s[#%d] is unsupported" % (
-                            connection['from'], connection['to'], i,
-                            connected['from'], connection['to'], connected['position'],
-                            ))
+            if connection["to"] in input_endpoints:
+                connected = input_endpoints[connection["to"]]
+                self.errors.append(
+                    "/connection/%s->%s[#%d]/: ending on the same "
+                    "input as /connection/%s->%s[#%d] is unsupported"
+                    % (
+                        connection["from"],
+                        connection["to"],
+                        i,
+                        connected["from"],
+                        connection["to"],
+                        connected["position"],
+                    )
+                )
             else:
-                input_endpoints[connection['to']] = {
-                        "from": connection['from'],
-                        "position": i,
-                        }
-
-            if connection['from'] not in outputs:
-                self.errors.append("/connections/%s->%s[#%d]/: invalid output endpoint '%s'" % (connection['from'], connection['to'], i, connection['from']))
-
-            if connection['to'] not in inputs:
-                self.errors.append("/connections/%s->%s[#%d]/: invalid input " \
-                        "endpoint '%s'" % (connection['from'], connection['to'], i,
-                            connection['to']))
+                input_endpoints[connection["to"]] = {
+                    "from": connection["from"],
+                    "position": i,
+                }
+
+            if connection["from"] not in outputs:
+                self.errors.append(
+                    "/connections/%s->%s[#%d]/: invalid output endpoint '%s'"
+                    % (connection["from"], connection["to"], i, connection["from"])
+                )
+
+            if connection["to"] not in inputs:
+                self.errors.append(
+                    "/connections/%s->%s[#%d]/: invalid input "
+                    "endpoint '%s'"
+                    % (connection["from"], connection["to"], i, connection["to"])
+                )
             else:
                 # we now know this input is connected at least once
-                if connection['to'] in unconnected_inputs:
-                    unconnected_inputs.remove(connection['to'])
+                if connection["to"] in unconnected_inputs:
+                    unconnected_inputs.remove(connection["to"])
 
-            if connection['channel'] not in channels:
-                self.errors.append("/connections/%s->%s[#d]/channel: invalid " \
-                        "synchronization channel '%s'" % (connection['from'],
-                            connection['to'], connection['channel']))
+            if connection["channel"] not in channels:
+                self.errors.append(
+                    "/connections/%s->%s[#d]/channel: invalid "
+                    "synchronization channel '%s'"
+                    % (connection["from"], connection["to"], connection["channel"])
+                )
 
-            connections.append('%s/%s' % (connection['from'], connection['to']))
+            connections.append("%s/%s" % (connection["from"], connection["to"]))
 
         if len(unconnected_inputs) != 0:
-            self.errors.append("input(s) `%s' remain unconnected" % \
-                    (", ".join(unconnected_inputs),))
+            self.errors.append(
+                "input(s) `%s' remain unconnected" % (", ".join(unconnected_inputs),)
+            )
 
     def _check_loop_connections(self, loop_connections):
         """Checks loop connection consistency"""
 
-        if not 'loop_connections' in self.data:
+        if not "loop_connections" in self.data:
             return
 
         endpoints = dict()
         unconnected_endpoints = dict()
 
-        for i, connection in enumerate(self.data['loop_connections']):
-            from_ = connection['from']
-            to_ = connection['to']
+        for i, connection in enumerate(self.data["loop_connections"]):
+            from_ = connection["from"]
+            to_ = connection["to"]
             if from_ in endpoints:
                 connected = endpoints[to_]
-                self.errors.append("/loop_connection/%s->%s[#%d]/: ending on the same "
-                        "endpoint as /loop_connection/%s->%s[#%d] is unsupported" % (
-                            from_, to_, i,
-                            connected['from'], connected['to'], connected['position'],
-                            ))
+                self.errors.append(
+                    "/loop_connection/%s->%s[#%d]/: ending on the same "
+                    "endpoint as /loop_connection/%s->%s[#%d] is unsupported"
+                    % (
+                        from_,
+                        to_,
+                        i,
+                        connected["from"],
+                        connected["to"],
+                        connected["position"],
+                    )
+                )
             else:
-                endpoints[to_] = {
-                    "from": from_,
-                    "position": i
-                }
+                endpoints[to_] = {"from": from_, "position": i}
 
             loop_connections.append("%s/%s" % (from_, to_))
 
@@ -316,115 +360,109 @@ class Toolchain(object):
         """Checks the representation for this toolchain"""
 
         # all connections must exist
-        for connection in self.data['representation']['connections']:
+        for connection in self.data["representation"]["connections"]:
             if connection not in connections:
-                self.errors.append("/representation/connections/%s: not listed " \
-                        "on /connections" % connection)
+                self.errors.append(
+                    "/representation/connections/%s: not listed "
+                    "on /connections" % connection
+                )
 
         # all blocks must exist
-        for block in self.data['representation']['blocks']:
+        for block in self.data["representation"]["blocks"]:
             if block not in names:
-                self.errors.append("/representation/blocks/%s: not listed on " \
-                        "/datasets, /blocks or /analyzers" % block)
+                self.errors.append(
+                    "/representation/blocks/%s: not listed on "
+                    "/datasets, /blocks or /analyzers" % block
+                )
 
         # all channel colors must be a valid dataset name
-        for channel in self.data['representation']['channel_colors']:
+        for channel in self.data["representation"]["channel_colors"]:
             if channel not in channels:
-                self.errors.append("/representation/channel_colors/%s: not a " \
-                        "dataset listed on /datasets" % channel)
-
+                self.errors.append(
+                    "/representation/channel_colors/%s: not a "
+                    "dataset listed on /datasets" % channel
+                )
 
     @property
     def schema_version(self):
         """Returns the schema version"""
-        return self.data.get('schema_version', 1)
-
+        return self.data.get("schema_version", 1)
 
     @property
     def name(self):
         """Returns the name of this object"""
 
-        return self._name or '__unnamed_toolchain__'
+        return self._name or "__unnamed_toolchain__"
 
     @name.setter
     def name(self, value):
         self._name = value
         self.storage = Storage(self.prefix, value)
 
-
     @property
     def datasets(self):
         """All declared datasets"""
 
-        data = self.data['datasets']
-        return dict(zip([k['name'] for k in data], data))
-
+        data = self.data["datasets"]
+        return dict(zip([k["name"] for k in data], data))
 
     @property
     def blocks(self):
         """All declared blocks"""
 
-        data = self.data['blocks']
-        return dict(zip([k['name'] for k in data], data))
-
+        data = self.data["blocks"]
+        return dict(zip([k["name"] for k in data], data))
 
     @property
     def loops(self):
         """All declared loops"""
 
-        data = self.data.get('loops', {})
-        return dict(zip([k['name'] for k in data], data))
-
+        data = self.data.get("loops", {})
+        return dict(zip([k["name"] for k in data], data))
 
     @property
     def analyzers(self):
         """All declared analyzers"""
 
-        data = self.data['analyzers']
-        return dict(zip([k['name'] for k in data], data))
-
+        data = self.data["analyzers"]
+        return dict(zip([k["name"] for k in data], data))
 
     def algorithm_item(self, name):
         """ Returns a block, loop or analyzer matching the name given"""
 
         item = None
 
-        for algo_items in [self.blocks,
-                           self.loops,
-                           self.analyzers]:
+        for algo_items in [self.blocks, self.loops, self.analyzers]:
 
             if name in algo_items:
                 item = algo_items.get(name)
                 break
         return item
 
-
     def get_loop_for_block(self, name):
         loop = None
         block = self.blocks.get(name, None)
         if block is not None:
 
             for connection in self.loop_connections:
-                if name in connection['from']:
-                    loop_name = connection['to'].split('.')[0]
+                if name in connection["from"]:
+                    loop_name = connection["to"].split(".")[0]
                     loop = self.loops.get(loop_name)
                     break
 
         return loop
 
-
     @property
     def connections(self):
         """All declared connections"""
 
-        return self.data['connections']
+        return self.data["connections"]
 
     @property
     def loop_connections(self):
         """All declared connections"""
 
-        return self.data.get('loop_connections', {})
-
+        return self.data.get("loop_connections", {})
 
     def dependencies(self, name):
         """Returns the block dependencies for a given block/analyzer in a set
@@ -434,36 +472,41 @@ class Toolchain(object):
         """
 
         dependencies = set()
-        datasets = self.datasets #property - does some work nevertheless
-        for conn in self.data['connections']:
-            from_ = conn['from'].split('.', 1)[0]
-            to_   = conn['to'].split('.', 1)[0]
-            if to_ == name and from_ not in datasets: dependencies.add(from_)
+        datasets = self.datasets  # property - does some work nevertheless
+        for conn in self.data["connections"]:
+            from_ = conn["from"].split(".", 1)[0]
+            to_ = conn["to"].split(".", 1)[0]
+            if to_ == name and from_ not in datasets:
+                dependencies.add(from_)
         return dependencies
 
-
     def execution_order(self):
         """Returns the execution order in an ordered dictionary with block
         deps.
         """
 
-        items = [k['name'] for k in self.data['blocks'] + self.data['analyzers']]
-        deps  = dict(zip(items, [self.dependencies(k) for k in items]))
+        items = [k["name"] for k in self.data["blocks"] + self.data["analyzers"]]
+        deps = dict(zip(items, [self.dependencies(k) for k in items]))
         queue = collections.OrderedDict()
 
         while len(items) != len(queue):  # while there are blocks/analyzers to treat
             insert = collections.OrderedDict()
             for k in items:
-                #if block has no executed deps
+                # if block has no executed deps
                 if k not in queue and deps[k].issubset(queue.keys()):
                     insert[k] = deps[k]  # insert into queue
                 queue.update(insert)
 
         return queue
 
-
-    def dot_diagram(self, title=None, label_callback=None, edge_callback=None,
-            result_callback=None, is_layout=False):
+    def dot_diagram(
+        self,
+        title=None,
+        label_callback=None,
+        edge_callback=None,
+        result_callback=None,
+        is_layout=False,
+    ):
         """Returns a dot diagram representation of the toolchain
 
         Parameters:
@@ -496,121 +539,140 @@ class Toolchain(object):
         """
 
         # the representation for channel colors must be complete
-        all_colors = set(self.data['representation']['channel_colors'].keys())
-        channels = set([k['name'] for k in self.data['datasets']])
+        all_colors = set(self.data["representation"]["channel_colors"].keys())
+        channels = set([k["name"] for k in self.data["datasets"]])
         missing = channels - all_colors
         if missing:
-            raise KeyError("/representation/channel_colors/%s: is missing " \
-                      "from object descriptor - fix it before drawing" % \
-                      ','.join(missing))
+            raise KeyError(
+                "/representation/channel_colors/%s: is missing "
+                "from object descriptor - fix it before drawing" % ",".join(missing)
+            )
 
         label_callback = None
         if is_layout:
-            label_callback = label_callback or (lambda x, y: '%s' % y)
+            label_callback = label_callback or (lambda x, y: "%s" % y)
         else:
-            label_callback = label_callback or (lambda x, y: '<b><u>%s</u></b>' % y)
+            label_callback = label_callback or (lambda x, y: "<b><u>%s</u></b>" % y)
 
-        edge_callback  = edge_callback or (lambda x: '')
+        edge_callback = edge_callback or (lambda x: "")
         result_callback = result_callback or (lambda x: [])
-        title = title or 'Toolchain: %s' % self.name
-        channel_colors = self.data['representation']['channel_colors']
+        title = title or "Toolchain: %s" % self.name
+        channel_colors = self.data["representation"]["channel_colors"]
 
         order = self.execution_order()
 
         from .drawing import make_label as make_drawing_label, make_layout_label
         from graphviz import Digraph
 
-        fontname = 'Helvetica'
-        fontsize = '12'
+        fontname = "Helvetica"
+        fontsize = "12"
 
         make_label = make_layout_label if is_layout else make_drawing_label
         root = Digraph(self.name)
-        splineType = 'line' if is_layout else 'polyline'
+        splineType = "line" if is_layout else "polyline"
         # default is 0.25, but it seems 0.5 is needed to keep everything separated
         # when the layout is parsed by beat.editor
-        nodesep = '0.5' if is_layout else '0.25'
-        root.attr('graph', rankdir='LR', compound='true', splines=splineType,
-                labelloc='t', label=title, fontname=fontname,
-                fontsize=str(3*int(fontsize)), nodesep=nodesep)
-
-        datasets = Digraph('dataset_cluster')
-        datasets.attr('graph', rank='same', label='datasets')
+        nodesep = "0.5" if is_layout else "0.25"
+        root.attr(
+            "graph",
+            rankdir="LR",
+            compound="true",
+            splines=splineType,
+            labelloc="t",
+            label=title,
+            fontname=fontname,
+            fontsize=str(3 * int(fontsize)),
+            nodesep=nodesep,
+        )
+
+        datasets = Digraph("dataset_cluster")
+        datasets.attr("graph", rank="same", label="datasets")
 
         for d, info in self.datasets.items():
-            datasets.node(d,
-              label=make_label([], label_callback('dataset', d), info['outputs'], channel_colors[d]),
-              shape='none',
-              fontsize=fontsize,
-              fontname=fontname,
-              )
+            datasets.node(
+                d,
+                label=make_label(
+                    [], label_callback("dataset", d), info["outputs"], channel_colors[d]
+                ),
+                shape="none",
+                fontsize=fontsize,
+                fontname=fontname,
+            )
 
         root.subgraph(datasets)
 
         def _draw_block(graph, n, info):
-            color = channel_colors[info['synchronized_channel']]
+            color = channel_colors[info["synchronized_channel"]]
 
-            if 'outputs' in info:
-                label = make_label(info['inputs'], label_callback('block', n),
-                        info['outputs'], color)
+            if "outputs" in info:
+                label = make_label(
+                    info["inputs"], label_callback("block", n), info["outputs"], color
+                )
             else:
-                label = make_label(info['inputs'], label_callback('analyzer', n),
-                        result_callback(n), color)
-
-            root.node(n,
-                    label=label,
-                    shape='none',
-                    fontsize=fontsize,
-                    fontname=fontname,
-                    )
-
-            for c in [k for k in self.connections if k['to'].startswith(n + '.')]:
-                edge_color = channel_colors[c['channel']]
+                label = make_label(
+                    info["inputs"],
+                    label_callback("analyzer", n),
+                    result_callback(n),
+                    color,
+                )
+
+            root.node(
+                n, label=label, shape="none", fontsize=fontsize, fontname=fontname
+            )
+
+            for c in [k for k in self.connections if k["to"].startswith(n + ".")]:
+                edge_color = channel_colors[c["channel"]]
                 if is_layout:
-                    label = edge_callback(c['from'])
-                    root.body.append('\t%s:e -> %s:w [color="%s"]' % \
-                            (c['from'].replace('.', ':output_'), c['to'].replace('.', ':input_'), edge_color))
+                    label = edge_callback(c["from"])
+                    root.body.append(
+                        '\t%s:e -> %s:w [color="%s"]'
+                        % (
+                            c["from"].replace(".", ":output_"),
+                            c["to"].replace(".", ":input_"),
+                            edge_color,
+                        )
+                    )
                 else:
                     root.edge(
-                            c['from'].replace('.', ':output_'),
-                            c['to'].replace('.', ':input_'),
-                            color=edge_color,
-                            label=edge_callback(c['from']),
-                            fontcolor=color,
-                            fontsize=fontsize,
-                            fontname=fontname,
-                            )
+                        c["from"].replace(".", ":output_"),
+                        c["to"].replace(".", ":input_"),
+                        color=edge_color,
+                        label=edge_callback(c["from"]),
+                        fontcolor=color,
+                        fontsize=fontsize,
+                        fontname=fontname,
+                    )
 
-        for name, info in self.blocks.items(): _draw_block(root, name, info)
+        for name, info in self.blocks.items():
+            _draw_block(root, name, info)
 
-        analyzers = Digraph('analyzer_cluster')
-        analyzers.attr('graph', rank='same', label='analyzers')
+        analyzers = Digraph("analyzer_cluster")
+        analyzers.attr("graph", rank="same", label="analyzers")
 
-        for name, info in self.analyzers.items(): _draw_block(analyzers, name, info)
+        for name, info in self.analyzers.items():
+            _draw_block(analyzers, name, info)
 
         root.subgraph(analyzers)
 
         return root
 
-
     @property
     def valid(self):
         """A boolean that indicates if this toolchain is valid or not"""
 
         return not bool(self.errors)
 
-
     @property
     def description(self):
         """The short description for this object"""
 
-        return self.data.get('description', None)
+        return self.data.get("description", None)
 
     @description.setter
     def description(self, value):
         """Sets the short description for this object"""
 
-        self.data['description'] = value
-
+        self.data["description"] = value
 
     @property
     def documentation(self):
@@ -630,12 +692,11 @@ class Toolchain(object):
         if not self._name:
             raise RuntimeError("toolchain has no name")
 
-        if hasattr(value, 'read'):
+        if hasattr(value, "read"):
             self.storage.doc.save(value.read())
         else:
             self.storage.doc.save(value)
 
-
     def hash(self):
         """Returns the hexadecimal hash for its declaration"""
 
@@ -644,7 +705,6 @@ class Toolchain(object):
 
         return self.storage.hash()
 
-
     def json_dumps(self, indent=4):
         """Dumps the JSON declaration of this object in a string
 
@@ -660,15 +720,12 @@ class Toolchain(object):
           str: The JSON representation for this object
         """
 
-        return simplejson.dumps(self.data, indent=indent,
-            cls=utils.NumpyJSONEncoder)
-
+        return simplejson.dumps(self.data, indent=indent, cls=utils.NumpyJSONEncoder)
 
     def __str__(self):
 
         return self.json_dumps()
 
-
     def write(self, storage=None):
         """Writes contents to prefix location
 
diff --git a/beat/core/utils.py b/beat/core/utils.py
index ee70c2fd9f7b323c876b71a632bdb71f7634ffe8..d41ab63917d715c5d413d393e5eec474a8c83f90 100644
--- a/beat/core/utils.py
+++ b/beat/core/utils.py
@@ -1,29 +1,38 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
+
 
 """
 =====
diff --git a/beat/core/version.py b/beat/core/version.py
index 8cc99c19399067c5dd205c07d3078b1ed020205a..834a3bc204d4664cb57f82964f832967747c3562 100644
--- a/beat/core/version.py
+++ b/beat/core/version.py
@@ -1,31 +1,39 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
 
 
 """Returns the currently compiled version number"""
 
-__version__ = __import__('pkg_resources').get_distribution('beat.core').version
+__version__ = __import__("pkg_resources").get_distribution("beat.core").version
diff --git a/beat/core/worker.py b/beat/core/worker.py
index 89b8700f198cb85d47f6dc84b0bfde6bf038d583..8c7e074ba14689b31fcf029b370399e88f4695c3 100644
--- a/beat/core/worker.py
+++ b/beat/core/worker.py
@@ -1,29 +1,38 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2017 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
+
 
 """
 ======
@@ -63,22 +72,20 @@ class WorkerController(object):
             :py:const:`SCHEDULER_SHUTDOWN`
     """
 
-
     # Status code
-    READY = b'rdy'  #: The worker is ready to be used
-    EXIT = b'ext'  #: The worker has exited
-    RECEIVED = b'rcv' #: The worker has received the task
-    DONE = b'don'  #: The worker as successfully finished its task
-    JOB_ERROR = b'erj'  #: The worker failed to finish its task
-    ERROR = b'err'  #: The worker encountered an error
-    CANCELLED = b'cld'  #: The worker's task has been canceled
+    READY = b"rdy"  #: The worker is ready to be used
+    EXIT = b"ext"  #: The worker has exited
+    RECEIVED = b"rcv"  #: The worker has received the task
+    DONE = b"don"  #: The worker as successfully finished its task
+    JOB_ERROR = b"erj"  #: The worker failed to finish its task
+    ERROR = b"err"  #: The worker encountered an error
+    CANCELLED = b"cld"  #: The worker's task has been canceled
 
     # Commands
-    EXECUTE = b'exe'  #: Execute the given job
-    CANCEL = b'cnl'  #: Cancel the given job
-    ACK = b'ack'  #: Acknowledge
-    SCHEDULER_SHUTDOWN = b'shd'  #: Shutdown the scheduler
-
+    EXECUTE = b"exe"  #: Execute the given job
+    CANCEL = b"cnl"  #: Cancel the given job
+    ACK = b"ack"  #: Acknowledge
+    SCHEDULER_SHUTDOWN = b"shd"  #: Shutdown the scheduler
 
     class Callbacks(object):
         """Set of callbacks used when a worker is ready or went away"""
@@ -87,7 +94,6 @@ class WorkerController(object):
             self.onWorkerReady = None
             self.onWorkerGone = None
 
-
     def __init__(self, address, port, callbacks=None):
         self.context = zmq.Context()
         self.context.setsockopt(socket.SO_REUSEADDR, 1)
@@ -95,12 +101,12 @@ class WorkerController(object):
         self.socket = self.context.socket(zmq.ROUTER)
 
         if port is not None:
-            self.address = 'tcp://%s:%d' % (address, port)
+            self.address = "tcp://%s:%d" % (address, port)
             self.socket.bind(self.address)
         else:
-            self.address = 'tcp://%s' % address
+            self.address = "tcp://%s" % address
             port = self.socket.bind_to_random_port(self.address, min_port=50000)
-            self.address += ':%d' % port
+            self.address += ":%d" % port
 
         self.poller = zmq.Poller()
         self.poller.register(self.socket, zmq.POLLIN)
@@ -114,13 +120,9 @@ class WorkerController(object):
         for k, v in callbacks.items():
             setattr(self.callbacks, k, v)
 
-
     def destroy(self):
         for worker in self.workers:
-            parts = [
-              worker,
-              WorkerController.SCHEDULER_SHUTDOWN,
-            ]
+            parts = [worker, WorkerController.SCHEDULER_SHUTDOWN]
             send_multipart(self.socket, parts)
 
         self.workers = []
@@ -135,7 +137,6 @@ class WorkerController(object):
         self.context.destroy()
         self.context = None
 
-
     def execute(self, worker, job_id, configuration):
         """Executes the given job by the given worker using passed
         configuration
@@ -147,14 +148,13 @@ class WorkerController(object):
         """
 
         parts = [
-          worker,
-          WorkerController.EXECUTE,
-          b'%d' % job_id,
-          simplejson.dumps(configuration)
+            worker,
+            WorkerController.EXECUTE,
+            b"%d" % job_id,
+            simplejson.dumps(configuration),
         ]
         send_multipart(self.socket, parts)
 
-
     def cancel(self, worker, job_id):
         """Cancels the given job on the given worker
 
@@ -163,14 +163,9 @@ class WorkerController(object):
             :param int job_id: Identifier of the job to execute
         """
 
-        parts = [
-          worker,
-          WorkerController.CANCEL,
-          b'%d' % job_id,
-        ]
+        parts = [worker, WorkerController.CANCEL, b"%d" % job_id]
         send_multipart(self.socket, parts)
 
-
     def ack(self, worker):
         """Send acknowledge to worker
 
@@ -178,13 +173,9 @@ class WorkerController(object):
             :param str worker: Address of the worker
         """
 
-        parts = [
-          worker,
-          WorkerController.ACK
-        ]
+        parts = [worker, WorkerController.ACK]
         send_multipart(self.socket, parts)
 
-
     def process(self, timeout=0):
         """Processing loop
 
@@ -198,7 +189,6 @@ class WorkerController(object):
                 corresponding data if any or None in case of error.
         """
 
-
         while True:
             socks = dict(self.poller.poll(timeout))
             if not (self.socket in socks) or (socks[self.socket] != zmq.POLLIN):
@@ -220,7 +210,7 @@ class WorkerController(object):
                 try:
                     self.workers.remove(address)
                 except:
-                    logger.error('Unknown worker: %s' % address)
+                    logger.error("Unknown worker: %s" % address)
                     return None
 
                 if self.callbacks.onWorkerGone is not None:
@@ -228,8 +218,11 @@ class WorkerController(object):
 
                 timeout = 0
 
-            elif status in [ WorkerController.DONE, WorkerController.JOB_ERROR,
-                             WorkerController.CANCELLED ]:
+            elif status in [
+                WorkerController.DONE,
+                WorkerController.JOB_ERROR,
+                WorkerController.CANCELLED,
+            ]:
                 job_id = int(data[0])
                 return (address, status, job_id, data[1:])
 
@@ -241,7 +234,6 @@ class WorkerController(object):
                 job_id = None
                 return (address, status, job_id, data)
 
-
     def _receive(self):
         parts = self.socket.recv_multipart()
         return parts[0], parts[1], parts[2:]
diff --git a/conda/meta.yaml b/conda/meta.yaml
index fa046b47853c9512ec61aa0a44a73e1227836732..fc13b17cd6072d26c4df7947ba645253dd1ad210 100644
--- a/conda/meta.yaml
+++ b/conda/meta.yaml
@@ -67,7 +67,7 @@ test:
 
 about:
   home: https://www.idiap.ch/software/beat/
-  license: AGPLv3
+  license: BSD
   summary: Core modules and definitions for the BEAT platform
-  license_family: AGPL
-  license_file: ../LICENSE.AGPL
+  license_family: BSD
+  license_file: ../LICENSE
diff --git a/doc/api.rst b/doc/api.rst
index b0523c9c46c3ae2c64e3c8578b68e10443f790cd..b4d0a8cf47dcc63f230e864b063e898e15d82e42 100644
--- a/doc/api.rst
+++ b/doc/api.rst
@@ -1,24 +1,34 @@
 .. vim: set fileencoding=utf-8 :
 
-.. Copyright (c) 2016 Idiap Research Institute, http:..www.idiap.ch.          ..
+.. Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/          ..
 .. Contact: beat.support@idiap.ch                                             ..
 ..                                                                            ..
-.. This file is part of the beat.core module of the BEAT platform.            ..
+.. This file is part of the beat.backend.python module of the BEAT platform.  ..
 ..                                                                            ..
-.. Commercial License Usage                                                   ..
-.. Licensees holding valid commercial BEAT licenses may use this file in      ..
-.. accordance with the terms contained in a written agreement between you     ..
-.. and Idiap. For further information contact tto@idiap.ch                    ..
-..                                                                            ..
-.. Alternatively, this file may be used under the terms of the GNU Affero     ..
-.. Public License version 3 as published by the Free Software and appearing   ..
-.. in the file LICENSE.AGPL included in the packaging of this file.           ..
-.. The BEAT platform 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.                                       ..
-..                                                                            ..
-.. You should have received a copy of the GNU Affero Public License along     ..
-.. with the BEAT platform. If not, see http:..www.gnu.org.licenses..          ..
+.. Redistribution and use in source and binary forms, with or without
+.. modification, are permitted provided that the following conditions are met:
+
+.. 1. Redistributions of source code must retain the above copyright notice, this
+.. list of conditions and the following disclaimer.
+
+.. 2. Redistributions in binary form must reproduce the above copyright notice,
+.. this list of conditions and the following disclaimer in the documentation
+.. and/or other materials provided with the distribution.
+
+.. 3. Neither the name of the copyright holder nor the names of its contributors
+.. may be used to endorse or promote products derived from this software without
+.. specific prior written permission.
+
+.. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+.. ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+.. WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+.. DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+.. FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.. DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+.. SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+.. CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+.. OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+.. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ====
@@ -78,4 +88,3 @@ This section includes information for using the Python API of ``beat.core``.
 .. automodule:: beat.core.utils
 
 .. automodule:: beat.core.worker
-
diff --git a/doc/backend_api.rst b/doc/backend_api.rst
index 31484c5eb835b425ffce31a1f68c7a50f0db870e..060a0b198056f4f6c12f1051b9f8d6059ae3fa3d 100644
--- a/doc/backend_api.rst
+++ b/doc/backend_api.rst
@@ -1,23 +1,33 @@
 
-.. Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/          ..
+.. Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/          ..
 .. Contact: beat.support@idiap.ch                                             ..
 ..                                                                            ..
-.. This file is part of the beat.core module of the BEAT platform.            ..
+.. This file is part of the beat.backend.python module of the BEAT platform.  ..
 ..                                                                            ..
-.. Commercial License Usage                                                   ..
-.. Licensees holding valid commercial BEAT licenses may use this file in      ..
-.. accordance with the terms contained in a written agreement between you     ..
-.. and Idiap. For further information contact tto@idiap.ch                    ..
-..                                                                            ..
-.. Alternatively, this file may be used under the terms of the GNU Affero     ..
-.. Public License version 3 as published by the Free Software and appearing   ..
-.. in the file LICENSE.AGPL included in the packaging of this file.           ..
-.. The BEAT platform 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.                                       ..
-..                                                                            ..
-.. You should have received a copy of the GNU Affero Public License along     ..
-.. with the BEAT platform. If not, see http://www.gnu.org/licenses/.          ..
+.. Redistribution and use in source and binary forms, with or without
+.. modification, are permitted provided that the following conditions are met:
+
+.. 1. Redistributions of source code must retain the above copyright notice, this
+.. list of conditions and the following disclaimer.
+
+.. 2. Redistributions in binary form must reproduce the above copyright notice,
+.. this list of conditions and the following disclaimer in the documentation
+.. and/or other materials provided with the distribution.
+
+.. 3. Neither the name of the copyright holder nor the names of its contributors
+.. may be used to endorse or promote products derived from this software without
+.. specific prior written permission.
+
+.. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+.. ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+.. WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+.. DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+.. FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.. DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+.. SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+.. CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+.. OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+.. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 .. _beat-core-backend-api:
diff --git a/doc/conf.py b/doc/conf.py
index df960e57c53ccf6fc8dd1d70a1b4fcb7c8729304..eb6826d563b4a07b7db15e87f37d5c3a6d03f688 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -1,54 +1,61 @@
 #!/usr/bin/env python
 # -*- coding: utf-8 -*-
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
-
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
 import os
 import pkg_resources
 
 # -- General configuration -----------------------------------------------------
 
 # If your documentation needs a minimal Sphinx version, state it here.
-needs_sphinx = '1.3'
+needs_sphinx = "1.3"
 
 # Add any Sphinx extension module names here, as strings. They can be extensions
 # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
 extensions = [
-    'sphinx.ext.todo',
-    'sphinx.ext.coverage',
-    'sphinx.ext.ifconfig',
-    'sphinx.ext.autodoc',
-    'sphinx.ext.autosummary',
-    'sphinx.ext.doctest',
-    'sphinx.ext.graphviz',
-    'sphinx.ext.intersphinx',
-    'sphinx.ext.napoleon',
-    'sphinx.ext.viewcode',
-    'sphinx.ext.mathjax',
+    "sphinx.ext.todo",
+    "sphinx.ext.coverage",
+    "sphinx.ext.ifconfig",
+    "sphinx.ext.autodoc",
+    "sphinx.ext.autosummary",
+    "sphinx.ext.doctest",
+    "sphinx.ext.graphviz",
+    "sphinx.ext.intersphinx",
+    "sphinx.ext.napoleon",
+    "sphinx.ext.viewcode",
+    "sphinx.ext.mathjax",
     #'matplotlib.sphinxext.plot_directive'
-    ]
+]
 
 # Be picky about warnings
 nitpicky = True
@@ -57,13 +64,13 @@ nitpicky = True
 nitpick_ignore = []
 
 # Allows the user to override warnings from a separate file
-if os.path.exists('nitpick-exceptions.txt'):
-    for line in open('nitpick-exceptions.txt'):
+if os.path.exists("nitpick-exceptions.txt"):
+    for line in open("nitpick-exceptions.txt"):
         if line.strip() == "" or line.startswith("#"):
             continue
         dtype, target = line.split(None, 1)
         target = target.strip()
-        try: # python 2.x
+        try:  # python 2.x
             target = unicode(target)
         except NameError:
             pass
@@ -79,25 +86,27 @@ autosummary_generate = True
 numfig = True
 
 # If we are on OSX, the 'dvipng' path maybe different
-dvipng_osx = '/Library/TeX/texbin/dvipng'
-if os.path.exists(dvipng_osx): pngmath_dvipng = dvipng_osx
+dvipng_osx = "/Library/TeX/texbin/dvipng"
+if os.path.exists(dvipng_osx):
+    pngmath_dvipng = dvipng_osx
 
 # Add any paths that contain templates here, relative to this directory.
-templates_path = ['_templates']
+templates_path = ["_templates"]
 
 # The suffix of source filenames.
-source_suffix = '.rst'
+source_suffix = ".rst"
 
 # The encoding of source files.
-#source_encoding = 'utf-8-sig'
+# source_encoding = 'utf-8-sig'
 
 # The master toctree document.
-master_doc = 'index'
+master_doc = "index"
 
 # General information about the project.
-project = u'beat.core'
+project = u"beat.core"
 import time
-copyright = u'%s, Idiap Research Institute' % time.strftime('%Y')
+
+copyright = u"%s, Idiap Research Institute" % time.strftime("%Y")
 
 # Grab the setup entry
 distribution = pkg_resources.require(project)[0]
@@ -113,42 +122,42 @@ release = distribution.version
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.
-#language = None
+# language = None
 
 # There are two options for replacing |today|: either, you set today to some
 # non-false value, then it is used:
-#today = ''
+# today = ''
 # Else, today_fmt is used as the format for a strftime call.
-#today_fmt = '%B %d, %Y'
+# today_fmt = '%B %d, %Y'
 
 # List of patterns, relative to source directory, that match files and
 # directories to ignore when looking for source files.
-exclude_patterns = ['links.rst']
+exclude_patterns = ["links.rst"]
 
 # The reST default role (used for this markup: `text`) to use for all documents.
-#default_role = None
+# default_role = None
 
 # If true, '()' will be appended to :func: etc. cross-reference text.
-#add_function_parentheses = True
+# add_function_parentheses = True
 
 # If true, the current module name will be prepended to all description
 # unit titles (such as .. function::).
-#add_module_names = True
+# add_module_names = True
 
 # If true, sectionauthor and moduleauthor directives will be shown in the
 # output. They are ignored by default.
-#show_authors = False
+# show_authors = False
 
 # The name of the Pygments (syntax highlighting) style to use.
-pygments_style = 'sphinx'
+pygments_style = "sphinx"
 
 # A list of ignored prefixes for module index sorting.
-#modindex_common_prefix = []
+# modindex_common_prefix = []
 
 # Some variables which are useful for generated material
-project_variable = project.replace('.', '_')
-short_description = u'Core modules and definitions for the BEAT platform'
-owner = [u'Idiap Research Institute']
+project_variable = project.replace(".", "_")
+short_description = u"Core modules and definitions for the BEAT platform"
+owner = [u"Idiap Research Institute"]
 
 
 # -- Options for HTML output ---------------------------------------------------
@@ -156,80 +165,81 @@ owner = [u'Idiap Research Institute']
 # The theme to use for HTML and HTML Help pages.  See the documentation for
 # a list of builtin themes.
 import sphinx_rtd_theme
-html_theme = 'sphinx_rtd_theme'
+
+html_theme = "sphinx_rtd_theme"
 
 # Theme options are theme-specific and customize the look and feel of a theme
 # further.  For a list of options available for each theme, see the
 # documentation.
-#html_theme_options = {}
+# html_theme_options = {}
 
 # Add any paths that contain custom themes here, relative to this directory.
 html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
 
 # The name for this set of Sphinx documents.  If None, it defaults to
 # "<project> v<release> documentation".
-#html_title = None
+# html_title = None
 
 # A shorter title for the navigation bar.  Default is the same as html_title.
-#html_short_title = project_variable
+# html_short_title = project_variable
 
 # The name of an image file (relative to this directory) to place at the top
 # of the sidebar.
-html_logo = 'img/logo.png'
+html_logo = "img/logo.png"
 
 # The name of an image file (within the static path) to use as favicon of the
 # docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
 # pixels large.
-html_favicon = 'img/favicon.ico'
+html_favicon = "img/favicon.ico"
 
 # Add any paths that contain custom static files (such as style sheets) here,
 # relative to this directory. They are copied after the builtin static files,
 # so a file named "default.css" will overwrite the builtin "default.css".
-#html_static_path = ['_static']
+# html_static_path = ['_static']
 
 # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
 # using the given strftime format.
-#html_last_updated_fmt = '%b %d, %Y'
+# html_last_updated_fmt = '%b %d, %Y'
 
 # If true, SmartyPants will be used to convert quotes and dashes to
 # typographically correct entities.
-#html_use_smartypants = True
+# html_use_smartypants = True
 
 # Custom sidebar templates, maps document names to template names.
-#html_sidebars = {}
+# html_sidebars = {}
 
 # Additional templates that should be rendered to pages, maps page names to
 # template names.
-#html_additional_pages = {}
+# html_additional_pages = {}
 
 # If false, no module index is generated.
-#html_domain_indices = True
+# html_domain_indices = True
 
 # If false, no index is generated.
-#html_use_index = True
+# html_use_index = True
 
 # If true, the index is split into individual pages for each letter.
-#html_split_index = False
+# html_split_index = False
 
 # If true, links to the reST sources are added to the pages.
-#html_show_sourcelink = True
+# html_show_sourcelink = True
 
 # If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
-#html_show_sphinx = True
+# html_show_sphinx = True
 
 # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
-#html_show_copyright = True
+# html_show_copyright = True
 
 # If true, an OpenSearch description file will be output, and all pages will
 # contain a <link> tag referring to it.  The value of this option must be the
 # base URL from which the finished HTML is served.
-#html_use_opensearch = ''
+# html_use_opensearch = ''
 
 # This is the file name suffix for HTML files (e.g. ".xhtml").
-#html_file_suffix = None
+# html_file_suffix = None
 
 # Output file base name for HTML help builder.
-htmlhelp_basename = project_variable + u'_doc'
+htmlhelp_basename = project_variable + u"_doc"
 
 
 # -- Post configuration --------------------------------------------------------
@@ -239,55 +249,58 @@ rst_epilog = """
 .. |project| replace:: BEAT
 .. |version| replace:: %s
 .. |current-year| date:: %%Y
-""" % (version,)
+""" % (
+    version,
+)
 
 # Default processing flags for sphinx
-autoclass_content = 'class'
-autodoc_member_order = 'bysource'
-autodoc_default_flags = [
-  'members',
-  'undoc-members',
-  'show-inheritance',
-  ]
-
-if not 'BOB_DOCUMENTATION_SERVER' in os.environ:
-  # notice we need to overwrite this for BEAT projects - defaults from Bob are
-  # not OK
-  os.environ['BOB_DOCUMENTATION_SERVER'] = "https://www.idiap.ch/software/beat/docs/beat/%(name)s/%(version)s/|https://www.idiap.ch/software/beat/docs/beat/%(name)s/master/"
+autoclass_content = "class"
+autodoc_member_order = "bysource"
+autodoc_default_flags = ["members", "undoc-members", "show-inheritance"]
+
+if not "BOB_DOCUMENTATION_SERVER" in os.environ:
+    # notice we need to overwrite this for BEAT projects - defaults from Bob are
+    # not OK
+    os.environ[
+        "BOB_DOCUMENTATION_SERVER"
+    ] = "https://www.idiap.ch/software/beat/docs/beat/%(name)s/%(version)s/|https://www.idiap.ch/software/beat/docs/beat/%(name)s/master/"
 
 # For inter-documentation mapping:
 from bob.extension.utils import link_documentation, load_requirements
+
 sphinx_requirements = "extra-intersphinx.txt"
 if os.path.exists(sphinx_requirements):
-  intersphinx_mapping = link_documentation(
-      additional_packages=['python','numpy'] + \
-          load_requirements(sphinx_requirements))
+    intersphinx_mapping = link_documentation(
+        additional_packages=["python", "numpy"] + load_requirements(sphinx_requirements)
+    )
 else:
-  intersphinx_mapping = link_documentation()
+    intersphinx_mapping = link_documentation()
 
 # Adds simplejson, pyzmq links
-intersphinx_mapping['http://simplejson.readthedocs.io/en/stable/'] = None
-intersphinx_mapping['http://pyzmq.readthedocs.io/en/stable/'] = None
-intersphinx_mapping['http://python-jsonschema.readthedocs.io/en/stable/'] = None
-intersphinx_mapping['https://docker-py.readthedocs.io/en/stable/'] = None
+intersphinx_mapping["http://simplejson.readthedocs.io/en/stable/"] = None
+intersphinx_mapping["http://pyzmq.readthedocs.io/en/stable/"] = None
+intersphinx_mapping["http://python-jsonschema.readthedocs.io/en/stable/"] = None
+intersphinx_mapping["https://docker-py.readthedocs.io/en/stable/"] = None
 
 # We want to remove all private (i.e. _. or __.__) members
 # that are not in the list of accepted functions
-accepted_private_functions = ['__array__']
+accepted_private_functions = ["__array__"]
+
 
 def member_function_test(app, what, name, obj, skip, options):
-  # test if we have a private function
-  if len(name) > 1 and name[0] == '_':
-    # test if this private function should be allowed
-    if name not in accepted_private_functions:
-      # omit private functions that are not in the list of accepted private
-      # functions
-      return skip
-    else:
-      # test if the method is documented
-      if not hasattr(obj, '__doc__') or not obj.__doc__:
-        return skip
-  return False
+    # test if we have a private function
+    if len(name) > 1 and name[0] == "_":
+        # test if this private function should be allowed
+        if name not in accepted_private_functions:
+            # omit private functions that are not in the list of accepted private
+            # functions
+            return skip
+        else:
+            # test if the method is documented
+            if not hasattr(obj, "__doc__") or not obj.__doc__:
+                return skip
+    return False
+
 
 def setup(app):
-  app.connect('autodoc-skip-member', member_function_test)
+    app.connect("autodoc-skip-member", member_function_test)
diff --git a/doc/develop.rst b/doc/develop.rst
index d2b3083e45e4cb185fa2c3c5dcaac4d71e907066..7082811457a5dab81f3798765d5afbc1af2c3e63 100644
--- a/doc/develop.rst
+++ b/doc/develop.rst
@@ -1,24 +1,35 @@
 .. vim: set fileencoding=utf-8 :
 
-.. Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/          ..
+.. Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/          ..
 .. Contact: beat.support@idiap.ch                                             ..
 ..                                                                            ..
-.. This file is part of the beat.core module of the BEAT platform.            ..
+.. This file is part of the beat.backend.python module of the BEAT platform.  ..
 ..                                                                            ..
-.. Commercial License Usage                                                   ..
-.. Licensees holding valid commercial BEAT licenses may use this file in      ..
-.. accordance with the terms contained in a written agreement between you     ..
-.. and Idiap. For further information contact tto@idiap.ch                    ..
-..                                                                            ..
-.. Alternatively, this file may be used under the terms of the GNU Affero     ..
-.. Public License version 3 as published by the Free Software and appearing   ..
-.. in the file LICENSE.AGPL included in the packaging of this file.           ..
-.. The BEAT platform 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.                                       ..
-..                                                                            ..
-.. You should have received a copy of the GNU Affero Public License along     ..
-.. with the BEAT platform. If not, see http://www.gnu.org/licenses/.          ..
+.. Redistribution and use in source and binary forms, with or without
+.. modification, are permitted provided that the following conditions are met:
+
+.. 1. Redistributions of source code must retain the above copyright notice, this
+.. list of conditions and the following disclaimer.
+
+.. 2. Redistributions in binary form must reproduce the above copyright notice,
+.. this list of conditions and the following disclaimer in the documentation
+.. and/or other materials provided with the distribution.
+
+.. 3. Neither the name of the copyright holder nor the names of its contributors
+.. may be used to endorse or promote products derived from this software without
+.. specific prior written permission.
+
+.. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+.. ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+.. WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+.. DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+.. FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.. DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+.. SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+.. CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+.. OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+.. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
 
 .. _beat-core-local-development:
 
diff --git a/doc/index.rst b/doc/index.rst
index 79ba91f5171b36f6ce2f3a1069c819e88e6bd1c6..b4ef6423c3ac2016cfadb99daf9541d9a890bc46 100644
--- a/doc/index.rst
+++ b/doc/index.rst
@@ -1,24 +1,34 @@
 .. vim: set fileencoding=utf-8 :
 
-.. Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/          ..
+.. Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/          ..
 .. Contact: beat.support@idiap.ch                                             ..
 ..                                                                            ..
-.. This file is part of the beat.core module of the BEAT platform.            ..
+.. This file is part of the beat.backend.python module of the BEAT platform.  ..
 ..                                                                            ..
-.. Commercial License Usage                                                   ..
-.. Licensees holding valid commercial BEAT licenses may use this file in      ..
-.. accordance with the terms contained in a written agreement between you     ..
-.. and Idiap. For further information contact tto@idiap.ch                    ..
-..                                                                            ..
-.. Alternatively, this file may be used under the terms of the GNU Affero     ..
-.. Public License version 3 as published by the Free Software and appearing   ..
-.. in the file LICENSE.AGPL included in the packaging of this file.           ..
-.. The BEAT platform 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.                                       ..
-..                                                                            ..
-.. You should have received a copy of the GNU Affero Public License along     ..
-.. with the BEAT platform. If not, see http://www.gnu.org/licenses/.          ..
+.. Redistribution and use in source and binary forms, with or without
+.. modification, are permitted provided that the following conditions are met:
+
+.. 1. Redistributions of source code must retain the above copyright notice, this
+.. list of conditions and the following disclaimer.
+
+.. 2. Redistributions in binary form must reproduce the above copyright notice,
+.. this list of conditions and the following disclaimer in the documentation
+.. and/or other materials provided with the distribution.
+
+.. 3. Neither the name of the copyright holder nor the names of its contributors
+.. may be used to endorse or promote products derived from this software without
+.. specific prior written permission.
+
+.. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+.. ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+.. WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+.. DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+.. FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.. DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+.. SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+.. CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+.. OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+.. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 .. _beat_core:
diff --git a/doc/introduction.rst b/doc/introduction.rst
index b68b07825393bf0962b6339edcc06dce02ac4262..46c66efe91d70aa3f7e355cbc0d7c9dfb60748b5 100644
--- a/doc/introduction.rst
+++ b/doc/introduction.rst
@@ -1,24 +1,34 @@
 .. vim: set fileencoding=utf-8 :
 
-.. Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/          ..
+.. Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/          ..
 .. Contact: beat.support@idiap.ch                                             ..
 ..                                                                            ..
-.. This file is part of the beat.core module of the BEAT platform.            ..
+.. This file is part of the beat.backend.python module of the BEAT platform.  ..
 ..                                                                            ..
-.. Commercial License Usage                                                   ..
-.. Licensees holding valid commercial BEAT licenses may use this file in      ..
-.. accordance with the terms contained in a written agreement between you     ..
-.. and Idiap. For further information contact tto@idiap.ch                    ..
-..                                                                            ..
-.. Alternatively, this file may be used under the terms of the GNU Affero     ..
-.. Public License version 3 as published by the Free Software and appearing   ..
-.. in the file LICENSE.AGPL included in the packaging of this file.           ..
-.. The BEAT platform 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.                                       ..
-..                                                                            ..
-.. You should have received a copy of the GNU Affero Public License along     ..
-.. with the BEAT platform. If not, see http://www.gnu.org/licenses/.          ..
+.. Redistribution and use in source and binary forms, with or without
+.. modification, are permitted provided that the following conditions are met:
+
+.. 1. Redistributions of source code must retain the above copyright notice, this
+.. list of conditions and the following disclaimer.
+
+.. 2. Redistributions in binary form must reproduce the above copyright notice,
+.. this list of conditions and the following disclaimer in the documentation
+.. and/or other materials provided with the distribution.
+
+.. 3. Neither the name of the copyright holder nor the names of its contributors
+.. may be used to endorse or promote products derived from this software without
+.. specific prior written permission.
+
+.. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+.. ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+.. WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+.. DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+.. FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.. DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+.. SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+.. CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+.. OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+.. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 .. _beat-core-introduction:
@@ -30,7 +40,7 @@
 A typical BEAT experiment is composed of several building blocks. Datasets that provide data to the system, algorithms that handles the functions introduced by user, analyzers that is in charge of interpreting the output result and producing the appropriate results and figures, and toolchains that determines the data flow between the blocks from datasets to the final results. In addition, each block accepts specific data formats and the data is synchronized between blocks neatly without users need to interfere. These basic functionalities that are introduced in `Getting Started with BEAT`_ are all defined and managed by ``beat.core``. For example, as it is explained in `Algorithms`_, algorithm objects should be derived from the class
 ``Algorithm`` when using Python or in case of C++, they should be derived from ``IAlgorithmLagacy``, ``IAlgorithmSequential``, or ``IAlgorithmAutonomous`` depending of the algorithm type. All these parent classes are defined in ``beat.core`` package.
 
-The rest of this document includes information about the backend api used to handle data through the BEAT ecosystem. For developers and advanced user there is information for local development of the package. 
+The rest of this document includes information about the backend api used to handle data through the BEAT ecosystem. For developers and advanced user there is information for local development of the package.
 
 
 .. include:: links.rst
diff --git a/doc/links.rst b/doc/links.rst
index 1f95bde1d154c6944fbf00490bdede13ae4ce3a9..477b357a0e50356b920444fa39378f129cc470cd 100644
--- a/doc/links.rst
+++ b/doc/links.rst
@@ -1,3 +1,35 @@
+
+.. Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/          ..
+.. Contact: beat.support@idiap.ch                                             ..
+..                                                                            ..
+.. This file is part of the beat.backend.python module of the BEAT platform.  ..
+..                                                                            ..
+.. Redistribution and use in source and binary forms, with or without
+.. modification, are permitted provided that the following conditions are met:
+
+.. 1. Redistributions of source code must retain the above copyright notice, this
+.. list of conditions and the following disclaimer.
+
+.. 2. Redistributions in binary form must reproduce the above copyright notice,
+.. this list of conditions and the following disclaimer in the documentation
+.. and/or other materials provided with the distribution.
+
+.. 3. Neither the name of the copyright holder nor the names of its contributors
+.. may be used to endorse or promote products derived from this software without
+.. specific prior written permission.
+
+.. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+.. ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+.. WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+.. DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+.. FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.. DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+.. SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+.. CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+.. OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+.. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
 .. Place your links here
 
 .. _beat: https://www.idiap.ch/software/beat
diff --git a/setup.py b/setup.py
index ff502847c55f59de36bdd705ccb9cb94a5505c5e..803164e2f0359e4d4999cdb4f62bbb0742698b89 100644
--- a/setup.py
+++ b/setup.py
@@ -1,30 +1,37 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
 
-###############################################################################
-#                                                                             #
-# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
-# Contact: beat.support@idiap.ch                                              #
-#                                                                             #
-# This file is part of the beat.core module of the BEAT platform.             #
-#                                                                             #
-# Commercial License Usage                                                    #
-# Licensees holding valid commercial BEAT licenses may use this file in       #
-# accordance with the terms contained in a written agreement between you      #
-# and Idiap. For further information contact tto@idiap.ch                     #
-#                                                                             #
-# Alternatively, this file may be used under the terms of the GNU Affero      #
-# Public License version 3 as published by the Free Software and appearing    #
-# in the file LICENSE.AGPL included in the packaging of this file.            #
-# The BEAT platform 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.                                        #
-#                                                                             #
-# You should have received a copy of the GNU Affero Public License along      #
-# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
-#                                                                             #
-###############################################################################
-
+###################################################################################
+#                                                                                 #
+# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/               #
+# Contact: beat.support@idiap.ch                                                  #
+#                                                                                 #
+# Redistribution and use in source and binary forms, with or without              #
+# modification, are permitted provided that the following conditions are met:     #
+#                                                                                 #
+# 1. Redistributions of source code must retain the above copyright notice, this  #
+# list of conditions and the following disclaimer.                                #
+#                                                                                 #
+# 2. Redistributions in binary form must reproduce the above copyright notice,    #
+# this list of conditions and the following disclaimer in the documentation       #
+# and/or other materials provided with the distribution.                          #
+#                                                                                 #
+# 3. Neither the name of the copyright holder nor the names of its contributors   #
+# may be used to endorse or promote products derived from this software without   #
+# specific prior written permission.                                              #
+#                                                                                 #
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED   #
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE          #
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE    #
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL      #
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      #
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER      #
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,   #
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   #
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.            #
+#                                                                                 #
+###################################################################################
 
 from setuptools import setup, find_packages
 
@@ -41,7 +48,7 @@ setup(
     version=open("version.txt").read().rstrip(),
     description="Core modules and definitions for the BEAT platform",
     url="https://gitlab.idiap.ch/beat/beat.core",
-    license="AGPLv3",
+    license="BSD",
     author="Idiap Research Institute",
     author_email="beat.support@idiap.ch",
     long_description=open("README.rst").read(),
@@ -59,7 +66,7 @@ setup(
     classifiers=[
         "Development Status :: 5 - Production/Stable",
         "Intended Audience :: Developers",
-        "License :: OSI Approved :: GNU Affero General Public License v3",
+        "License :: OSI Approved :: BSD",
         "Natural Language :: English",
         "Programming Language :: Python",
         "Programming Language :: Python :: 3",