refactored register_spec to include helper method

Signed-off-by: Gerard Cote <grcote@gmail.com>