Refactor and improvements
Update doc