New version

This is a much cleaner interface than before