Refactoring: split support material code into several methods