Auto reclaim domains

https://jira2.iparadigms.com/secure/RapidBoard.jspa?rapidView=18&selectedIssue=TRN-22
Seems to me like the issue here is that there are too many levels of indentation which leads to making things harder to understand for me as I am reading the code. We have 2 for loops and then 3 levels of indentation of ifs, Dan's suggestion allows us to be able to get rid of some of those levels of indentation by abstracting out some of the logic into a different function.