Added documentation and TODOs