improvement: use posix compliant options names, use same function for parsing remote and local options