added --all flag, --free-cores not yet implemented, added help text, added comments, reorged code a bit