Removed `onpause` and other attributes like it and refactored it to be eventlisteners (like it should be)