Cleaner, more idiomatic code