Abstracted dynamic code away to spec