Clean code, add test