lots of changes to separate out views