rearranging some functions
removed is_opaque method
cleanup
cleanup