added portable library and attempt to handle free arguments

more information in the mail I sent you.