refactor to add some helper methods to the config object and added read only flag for 'view' mode