Extract the musical logic into a separate common library.

Remove the direct dependency on Jackson. Move also the test, to the tests project is deleted.