Some more code simplification