Update sorce and add docs