Move library code to 'lib'

Created by  Kris Nuttycombe  on November 24, 2014
5W5M56VJFJEBXMGBVKGCKPHOEMVTKUOQMLPJP7VNDQLTYNJXXLHQC
Change contents