minor refactor and documentation started...