Array prototype and bug fixes