upadte styles
add average component and a few small fixes