Added Rules class with other classes updated