Improving documentation, code clean up