Added spec, changed logic slightly
Merge remote-tracking branch 'origin/master'