Added simple repeat
Small optimizations for demo