Changed main interface for more general package use