renamed css to dom
fixed regex, namings. added a few comments
fixed names, added a few comments. implemented CSS merge logic