removing spurious white spaces
call rst_init and rst_finalize in correct places