If no port is specified, try to guess it from wildcards

Fix #197
Cleaned up 1.5 branch