Added random pulse animation. Refactored main-logic into Main class.