Added testcases. Fixed two Rp Boundary Bugs.