Refactored filelib dependency out.
Fixed main class.
Merge pull request #115 from xi-project/publisher-refactor

Refactored filelib dependency out.