Recurrent fixes + unit tests