Refactor id parameter

Was more complicated than it needed to be