Fixed consuming jpg images issue and some formatting