modified location of src lib, added defaults and reordered API