fix astyled code and add doxy comments