It looks like all this if structure is doing is catching whether or not the id has a `#` prepended to it. Is there a way to avoid this?