Initial commit of library functions