Make a bit more functional