Formatted code to GoogleCodeStyle. Fixed misc warnings
Added intellij project