Extracted functions, predicates and stuff to own library.
Added dependency to this library.