Some reorganizing and API updates