More fixes for travis test 12 and some code cleaning