Refactored lib/mincore.rb