Added further documentations and finished TODOs.