add inline documenation and cleanup module