Added pure virtual, many comments, fixed some error messages
Test cases