move some subs around and create Rakefile spec task