Added views functions. Added templates and style.