Small code clenaup on core