Implemented enum for ranking types and some code styles