Made settings global. Implemented execute_from_command_line.