Improved error handling, and parameter functionality

can handle single ports and port ranges as entries.