Improved and converted to sqlalchemy

Still not a perfect and nice looking creator, but for now it works.