Re-sync azmikemm's fork