Refactored raven plugin