Clean code improvements