Clean up collisions
Make OCLint happier
Convert main loop to a recurring alarm