configure gemfiles
add galleries folder.
fix some bugs...
fix some bugs, rename some vars, change some code formating.