ctx analyzer updates and unit tests