Refactor play video button code

Clean up the mess of the 'play video' button functionality and also add/update javadoc