Using just one function to manage events. Now check them every 250ms. Works a lot better.