2Lementry Library and API code