make factories module expose only factories
updated contributor
license and imports re-order
fixed relative imports
fix psycopg2 import
add pylama check