Is there a more minimal way to do this repetitive declarations?