Completely re-worked solution. Removed a TON of code.