Build library with libtool.
Rearrange library in several files.
Rearrange source in controller and gui.