broken, but in good shape

Fixed all the data handling, now working on views.