Some tests and better interface