Finished regex comparison logic and cleaned up some code/comments.