javascript physics made easy and event management easier