assorted refactorings
got rid of __proto__
reformated