further refactoring

still not really nice but much less global pollution now.