GUI improvements, port error and access denied functions, cleaned up unnecessary externs in C code