Further Tidy Ups and removal of idle code