Moved initializing ratings() method to the top of the module