Build with autotools
Rewrite tests