Made plugin more pythony.