Created the categories element controller class.
Updated some syntax and commenting.