[#729] Slight code refactor