Fixed formatting
Added cache
Added gen_server calls
Added missing gen_server behavior
Fixed formatting