yet moar updates but some code cleaning too