fixed minor bugs and updated test files