Improving code in order to pass Travis tests.