Complete gen_server behaviour
Fix formatting