Refactored repeat button and rendering. Fixes #21