Adding SourceDirectoryAware trait and interface
simplifying logic