fixed #flatten, removed unused variables.
On branch master
modified:   lib/bolgia.js