documentation and todos added.