Split the app into multiple files.

Now, only parts of the program depend on specific libraries. All public
functions (in .h files) use custom wb types that do not depend on
libraries, so at any time modules can be reimplemented to use another
library.