Cleaned up code added images to show issues