Added comments and changed some basic formatting