Added initialize method plus tests