Refactor and add some more system tests, remove filename renaming.