Added docstrings. Replaced io_port variables with io_port_id where relevant

Replaced io_port with io_port_id where not referring to IOPortBase subclasses