Implement support for setting internal/external antenna; reindent code.