Library structures and functions