Extract logic to separate package

Hello,

can you extract `goupx` logic to separate package?
That way other tools (like [goxc](https://github.com/laher/goxc/) or IDEs) can import it and use on the fly.

Best regards,
Dobrosław Żybort