Moved constants and distance calculation to a module.
rewritten the message so that it is one multi line template.
fixed a bug in while loop, added a test if the new input is a known star and
break the loop.