Cleaned up readviewcontroller code