Update regp.go

Fixed so it will format properly, and removed a bit of deprecated code