Refactoring of code in aterm support (adding more tests of Sept 2013 work).
Merge remote-tracking branch 'origin/master' into HEAD