Reduce code duplication / cleanup