Compile to library

Cleanup heirachy

Add install to make