Improved comments for init procedure.
Rearranged order of function declarations to correspond to order of use.