Added a test file and some minor changes