Added rank plugin and bug fixes