Added library functions and some methods