Move template logic to JTS and add View Classes