Added a listing for all the bytecodes
Added function comments to the header files
Added an explicit type for resources.

(As opposed to mixing up 'unsigned' and 'uint16_t' everywhere).