Added spec inference

TO DO: Add splat handler