Added funcs, building main lib