Final commit, this cleaned up version was used in production.