Simplified files and added more unit tests