cleaned up lib and init