added comments
Added comments and cleaned up old debugging code