New build process

many small changes regarding building this and dependency libraries