Restructured a little to add initial test, not working yet