Fixed contact test and added viewport to layout