Moved pull mode of operation to command-line option, fixed some erros from merge