Greatly simplified the code. Got rid of all "experimental" stuff.