added comments
some cleaning