Plugin code works, cleaned up old code