Refactor using foreverb; Fix typo-bug in GPU code