[cvs-nhc98] patch applied (hat): Just reformat code a bit and add type declarations.