Fail when dividing by zero

Also change the order of parameters in is_multiple_of().
Also fixed indentation.