Improved API, added rect drawing, cursor funcs