improved documentation
TODO items and cleanup