refine amf0, rename internal classes