Enable commented tests. Fix a few minor bugs