Perfomance and design code improvements