all is working, cleaning code and writing documentation