Added some documentation and TODOs.