Almost finished. need to write the output, but that's it.

MEOWMEOWMEOWMEOW MEOW. DEAL WITH MY PROBLEMS>