Moved testing stuff out of library