separate library and executables

this avoids recompilation of shared modules
cabal automatically detects Messages (cabal configure)