More fixes, add sanity checks to user input, prevent mismatched targets.

There may be some definite fallout from commit ab1e03061b34c5fb2516d20e77994fb388cb15bc . The rest however is fairly straight forward. Again, totally welcome to cherry pick whatever you wish, hopefully it's all for the better :8ball: