Improving calculator program