Added support for repeat and other stuff