added handling for talk pages; code clean up

Change-Id: Ib02ac5b3067652be8b8ab1ce3d9c75d564650bd9