Used extension methods to cleanup and condense Xtend code.