First commit
Fixed the interface and added some tests