Refactored filelib dependency out.

Refactored filelib dependency outta publishers.
Refucktored tests (potential for refuctoring remains)
Made a lot of PHPCS fixes.