Fixed Errors, Working Test Cases