Library branch

More library commits for demo branch