Tidy up indentation

Thanks for the great work on this extension -- it's pretty slick!

I found the code a little inconsistent with whitespace when I took a look at the code, so I've consistently replaced tabs with 4 spaces. I've also refined some of the templates (again, whitespace and semicolons).