added wrappers and BUGS file
rearranged definitions into proper header files