Changes to replays and tests

Refactored some replay functionality so it was grouped closer together.
Also made the parser more lenient towards whitespace

Fixed the tests so importing happened correctly.