Added new functions and refactored code

Added missing functions.
Changed to order of the functions to match that of the libudis86 header file.