Cleaned out old style code (in separate branch now), and added a few comments
fix another tiny bug