preliminary tidy up - remove redundant refs to __LINE__
preliminary tidy up - mostly removing unused params
preliminary tidy up - trailing spaces & comments
preliminary clean up - improve tear down function
Merge pull request #4350 from eileenmcnaughton/CRM-15446

CRM-15446 preliminary tidyup