Cleaned up lib