Fixed syntax and compile errors. Updated to rev. 1.3.