Rearranged the width and height methods based on usage. Added onHeadersReady callback.