Clean up wallet up doku

Started adding comments and type specs. Not checked yet.