Moved libraries around to bit more consistent

Updated code to use new API