beginning decoupling of views and network and more code cleanup