random refactoring/performance improvements