Adding comments

Comments on each important line. Also a function that set different
rules for each domain