Fix bug with blank & wrote some tests for rules