added more constraints and added logggers to most of the classes