Make tests consistent
Improve building script