Re-factorings and tidying up. Support for pomFile.