Updated initialize to accept username and apikey