simplified the whole thing and added a rudimentary interface
Removed some testing code