Update to use mylib library.

Need to improve some functions later.