Improve readability, and simplify code