Started conversion to rev. 1126+
Changed function names to new ones, testing coming soon :).
Fixed error in code.
Made ready for rev 1126+