Fixed Unit Tests Errors and Added More Tests