Adding test cases for subject-pool and fixing bugs found