Coding exercise - Francesco Zaia

Refactored main application code, improved test suite and added CI.