Refactor to make more modular.

Added zero clipboard, and the usual stuff.