More tests + small coding style fixes