a few optimizations, removed some unused stuff