Cleanup and impliment further DRY