Added tests for new methods and conditions; fixed many IDEA warnings.