Add some docs strings and clean the code here and there