Add viewstate.h, remove unused files.