Issues 224 and 228

I reformated the the and added the new rules at the end, new tests are added too.