moving optimizer to separate package.
fixing style.
fixing FlatHashTable for scala 2.11