rm style tests
minor improvements
fix a few bugs