Improved agent class doc comments a lot
fixed begincode->code doxygen errors