new subroutines OTTAVATE and END_OTTAVATE + other minor changes