Applied Google code format. Fixed misc warnings and dead code
Added intellij project