Fixed service snippet and added factory snippet