Converting over old code

- Honestly, don't know why I'm doing this. Clearly just needed to re-read code, make small changes.
- Tests broken, more need to be written