Seperating API and example code