Refactor filename
Code tidying and working on tests.