Generator expressions are being used instead loops/append.
Optimize checking loop.
Fix 'broad exception' - catching specific exception.
Simplified registration of a blueprints with the funcy lib.
Code format.
Simplified code with funcy lib.