Refactor of constructors.py and doc writing