Reformatted and added documentation