Improved Repeat constructor