Added custom ranks and fixes

Added custom ranks and fixes