Start to re-organize code to use the external libraries