Added apache licenese and formated code
Merge remote-tracking branch 'origin/master'