Replace a lot of table definitions with TABLE OF as the table type does not exist in my 7.40 SP4 system

In addition to that I've done a pretty print with keywords upper case.