Improve design of classes