Progress of new backend API

I created this thread to remove some codes when integrating metal.