Added library functionality.
Merge branch 'library' into develop