Added initial lib code