Updated code

Added library and documentation