cleanup + some new features