Improving class design