Cleanup code to make it more DRY

Your fingers are expensive assets, don't overuse them. Keep you code DRY