Fixed some rubocop issues
Added testting