moved view data into their respective functions

For reasons I don't understand, when loading an external file into a
function, it doesn't work if the function or any dependencies is needed
by the WP front end; i.e. the Views files work on the admin side.