Clean some code and add the user guide