Fixed some design smells.