Added some tests, fixed some filenaming issues.