added onPaused event; renamed some static vars