Added basic setData function to views