Added basic wrapper for pollEvents