Removed unnecessary relative imports
Fixed tabs/spaces mixed
Fixed bug in process_terminal_options