Remove needless code-duplication with some syntactic sugar