cleaned up css class name determination and regex
removed excess code and pair validation thing
added guava, replaced strings with constants for http headers