Added gen_server impl for simpler usage