cleaned up library struct