Code clarity, refactor tests