Added functionality to pause and resume buttons

Might need reworking in the future, but for now it seems to work okay.