Added more clarification, changed code to comply with the v5 changes.