added a test suite for repeatedblocks.py
fixed bugs in repeatedblocks test suite. Tests exposed some bugs in the code, which were fixed. Still building test suite for macros.py and debugging the code.