Improvements in runtime and readability