Refactored: split to partial script