Many changes

Signed-off-by: Francesco Battaglini <francesco@battaglini.net>