Fixed img pathes and optimized some code.