Added docu for most functions, Ran some checks