Merged changes to add support for alternative ports (#9)