Fix auto playing and refactor defines.