enable loading resource files from jar

Move all resource files and modify codes so that the resource files can
be load from jar inside.