This needs a lot more cleanup to work more generically for others.