Fixed some extra errors and added lots of test files