Added PauseLayer.
Added pause and restart function.