Implemented a wave system.