Update 20141008

osimage and ostarget will be used in other functions, so I won't fix them.
Any potential bugs will be fixed anyway.